本文整理了Java中android.widget.TableRow.<init>()
方法的一些代码示例,展示了TableRow.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableRow.<init>()
方法的具体详情如下:
包路径:android.widget.TableRow
类名称:TableRow
方法名:<init>
暂无
代码示例来源:origin: firebase/firebase-jobdispatcher-android
private void addRow(TableLayout tableLayout, String text) {
TableRow tableRow = new TableRow(this);
TextView textView = new TextView(this);
textView.setText(text);
tableRow.addView(textView);
tableLayout.addView(tableRow);
}
}
代码示例来源:origin: iSoron/uhabits
private TableRow createTableRow() {
TableRow row = new TableRow(getContext());
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
row.setLayoutParams(params);
return row;
}
代码示例来源:origin: Neamar/KISS
private TableRow createTableRow() {
TableRow row = new TableRow(getContext());
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
row.setLayoutParams(params);
return row;
}
代码示例来源:origin: willowtreeapps/Hyperion-Android
private List<TableRow> getTableRows(Context context, Cursor cursor) {
TableRow header = new TableRow(context);
cursor.moveToFirst();
TableRow row = new TableRow(context);
for (int col = 0; col < cursor.getColumnCount(); col++) {
TextView textView = new TextView(context);
代码示例来源:origin: org.metawidget.modules/metawidget-all
@Override
protected ViewGroup newViewToAddTo( ViewGroup container ) {
return new TableRow( container.getContext() );
}
代码示例来源:origin: consp1racy/android-support-preference
@NonNull
private TableRow createTableRow() {
final TableRow row = new TableRow(getContext());
final ViewGroup.LayoutParams params =
new ViewGroup.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
row.setLayoutParams(params);
return row;
}
代码示例来源:origin: adrianchifor/Swiftnotes
private TableRow createTableRow() {
TableRow row = new TableRow(getContext());
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
row.setLayoutParams(params);
return row;
}
代码示例来源:origin: daliyan/MyKeep
private TableRow createTableRow() {
TableRow row = new TableRow(getContext());
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
row.setLayoutParams(params);
return row;
}
代码示例来源:origin: THEONE10211024/ApiDemos
private void appendRow(TableLayout table) {
TableRow row = new TableRow(this);
TextView label = new TextView(this);
label.setText(R.string.table_layout_8_quit);
label.setPadding(3, 3, 3, 3);
TextView shortcut = new TextView(this);
shortcut.setText(R.string.table_layout_8_ctrlq);
shortcut.setPadding(3, 3, 3, 3);
shortcut.setGravity(Gravity.RIGHT | Gravity.TOP);
row.addView(label, new TableRow.LayoutParams(1));
row.addView(shortcut, new TableRow.LayoutParams());
table.addView(row, new TableLayout.LayoutParams());
}
}
代码示例来源:origin: qiubiteme/android_api_demos
private void appendRow(TableLayout table) {
TableRow row = new TableRow(this);
TextView label = new TextView(this);
label.setText(R.string.table_layout_7_quit);
label.setPadding(3, 3, 3, 3);
TextView shortcut = new TextView(this);
shortcut.setText(R.string.table_layout_7_ctrlq);
shortcut.setPadding(3, 3, 3, 3);
shortcut.setGravity(Gravity.RIGHT | Gravity.TOP);
row.addView(label, new TableRow.LayoutParams(1));
row.addView(shortcut, new TableRow.LayoutParams());
table.addView(row, new TableLayout.LayoutParams());
}
}
代码示例来源:origin: THEONE10211024/ApiDemos
private void appendRow(TableLayout table) {
TableRow row = new TableRow(this);
TextView label = new TextView(this);
label.setText(R.string.table_layout_7_quit);
label.setPadding(3, 3, 3, 3);
TextView shortcut = new TextView(this);
shortcut.setText(R.string.table_layout_7_ctrlq);
shortcut.setPadding(3, 3, 3, 3);
shortcut.setGravity(Gravity.RIGHT | Gravity.TOP);
row.addView(label, new TableRow.LayoutParams(1));
row.addView(shortcut, new TableRow.LayoutParams());
table.addView(row, new TableLayout.LayoutParams());
}
}
代码示例来源:origin: qiubiteme/android_api_demos
private void appendRow(TableLayout table) {
TableRow row = new TableRow(this);
TextView label = new TextView(this);
label.setText(R.string.table_layout_8_quit);
label.setPadding(3, 3, 3, 3);
TextView shortcut = new TextView(this);
shortcut.setText(R.string.table_layout_8_ctrlq);
shortcut.setPadding(3, 3, 3, 3);
shortcut.setGravity(Gravity.RIGHT | Gravity.TOP);
row.addView(label, new TableRow.LayoutParams(1));
row.addView(shortcut, new TableRow.LayoutParams());
table.addView(row, new TableLayout.LayoutParams());
}
}
代码示例来源:origin: jorgegil96/All-NBA
private void addSeparatorRowToPlayers() {
TableRow row = new TableRow(getActivity());
row.setLayoutParams(new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
View view = LayoutInflater.from(getActivity())
.inflate(R.layout.box_score_separator, row, false);
row.addView(view);
playersTable.addView(row, new TableLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
}
代码示例来源:origin: jjhesk/KickAssSlidingMenu
protected TableRow newTempHolder() {
TableRow linearLayout_temp = new TableRow(getActivity());
linearLayout_temp.setLayoutParams(new TableRow.LayoutParams(screen_size.x, row_height));
return linearLayout_temp;
}
代码示例来源:origin: jjhesk/KickAssSlidingMenu
protected TableRow newTempHolder() {
TableRow linearLayout_temp = new TableRow(getActivity());
linearLayout_temp.setLayoutParams(new TableRow.LayoutParams(screen_size.x, row_height));
return linearLayout_temp;
}
代码示例来源:origin: jorgegil96/All-NBA
private void addSeparatorRowToStats(int columns) {
TableRow row = new TableRow(getActivity());
row.setLayoutParams(new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
for (int i = 0; i < columns; i++) {
View view = LayoutInflater.from(getActivity())
.inflate(R.layout.box_score_separator, row, false);
row.addView(view);
}
statsTable.addView(row, new TableLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
}
代码示例来源:origin: pires/android-obd-reader
private void addTableRow(String id, String key, String val) {
TableRow tr = new TableRow(this);
MarginLayoutParams params = new ViewGroup.MarginLayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params.setMargins(TABLE_ROW_MARGIN, TABLE_ROW_MARGIN, TABLE_ROW_MARGIN,
TABLE_ROW_MARGIN);
tr.setLayoutParams(params);
TextView name = new TextView(this);
name.setGravity(Gravity.RIGHT);
name.setText(key + ": ");
TextView value = new TextView(this);
value.setGravity(Gravity.LEFT);
value.setText(val);
value.setTag(id);
tr.addView(name);
tr.addView(value);
tl.addView(tr, params);
}
代码示例来源:origin: jjhesk/KickAssSlidingMenu
protected TableRow newTempHolderBy2() {
TableRow linearLayout_temp = new TableRow(getActivity());
linearLayout_temp.setLayoutParams(new TableRow.LayoutParams(screen_size.x, calculateRowHeightBy2()));
return linearLayout_temp;
}
代码示例来源:origin: jjhesk/KickAssSlidingMenu
protected TableRow newTempHolderBy2() {
TableRow linearLayout_temp = new TableRow(getActivity());
linearLayout_temp.setLayoutParams(new TableRow.LayoutParams(screen_size.x, calculateRowHeightBy2()));
return linearLayout_temp;
}
代码示例来源:origin: jorgegil96/All-NBA
public void addRowToPlayersTable2(String content) {
TableRow row = new TableRow(getActivity());
row.setLayoutParams(new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
int width = (int) UnitUtils.convertDpToPixel(100, getActivity());
row.setMinimumWidth(width);
if (content.equals("PLAYER")) {
TextView tv = addHeaderItem(row, content);
tv.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
row.addView(tv);
} else {
TextView tv = addNormalItem(row, content);
tv.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
row.addView(tv);
}
playersTable.addView(row, new TableLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
}
内容来源于网络,如有侵权,请联系作者删除!