android.widget.TableLayout.setColumnStretchable()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中android.widget.TableLayout.setColumnStretchable()方法的一些代码示例,展示了TableLayout.setColumnStretchable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout.setColumnStretchable()方法的具体详情如下:
包路径:android.widget.TableLayout
类名称:TableLayout
方法名:setColumnStretchable

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);

相关文章