本文整理了Java中android.widget.TableLayout.setColumnStretchable()
方法的一些代码示例,展示了TableLayout.setColumnStretchable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout.setColumnStretchable()
方法的具体详情如下:
包路径:android.widget.TableLayout
类名称:TableLayout
方法名:setColumnStretchable
暂无
代码示例来源:origin: stackoverflow.com
TableLayout tblLayout;
tblLayout.setColumnStretchable(0, true);
tblLayout.setColumnStretchable(1, true);
tblLayout.setColumnStretchable(2, true);
代码示例来源:origin: stackoverflow.com
TableLayout table = new TableLayout(getApplicationContext());
table.setColumnStretchable(1, true);
table.setColumnStretchable(2, true);
table.setStretchAllColumns(true);
tableRow = new TableRow[20];
tableRow[i] = new TableRow(getApplicationContext());
tableRow[i].setGravity(Gravity.CENTER);
for (int j = 0; j < 4; j++) {
statistics = new TextView[4];
statistics[i] = new TextView(getApplicationContext());
statistics[i].setText("Text");
statistics[i].setGravity(Gravity.LEFT);
tableRow[i].addView(statistics[i]);
}
table.addView(tableRow[i]);
代码示例来源:origin: org.metawidget.modules/metawidget-all
/**
* Initialize the TableLayout.
* <p>
* We don't initialize the TableLayout unless we find we have something to put into it, because
* Android doesn't like empty TableLayouts.
*/
@Override
protected android.widget.TableLayout getLayout( ViewGroup container ) {
if ( container.getChildCount() == 0 || !( container.getChildAt( container.getChildCount() - 1 ) instanceof android.widget.TableLayout ) ) {
android.widget.TableLayout layout = new android.widget.TableLayout( container.getContext() );
layout.setOrientation( android.widget.LinearLayout.VERTICAL );
layout.setColumnStretchable( 1, true );
container.addView( layout, new android.widget.LinearLayout.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT ) );
return layout;
}
return (android.widget.TableLayout) container.getChildAt( container.getChildCount() - 1 );
}
}
代码示例来源:origin: stackoverflow.com
tl.setColumnStretchable(0, true);
tl.setColumnStretchable(1, true);
tl.setColumnStretchable(2, true);
代码示例来源:origin: stackoverflow.com
tr1.addView(textview);
chatbox.setColumnStretchable(1, true);
chatbox.addView(tr1, new TableLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
代码示例来源:origin: stackoverflow.com
tl.setColumnStretchable( 1, true ); // this line fix the error
代码示例来源:origin: livroandroid/5ed
tabela.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
tabela.setColumnStretchable(1, true);
内容来源于网络,如有侵权,请联系作者删除!