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

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

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

TableLayout.setOrientation介绍

暂无

代码示例

代码示例来源: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

ll.setOrientation(LinearLayout.HORIZONTAL);
ll.setGravity(Gravity.TOP);
ll.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,

代码示例来源:origin: Catrobat/Paintroid

private void init(Context context) {
  tableLayout.setGravity(Gravity.TOP);
  tableLayout.setOrientation(TableLayout.VERTICAL);
  tableLayout.setStretchAllColumns(true);
  tableLayout.setShrinkAllColumns(true);

相关文章