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

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

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

TableLayout.setStretchAllColumns介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

TableLayout prices = (TableLayout)findViewById(R.id.prices);
 prices.setStretchAllColumns(true);
 prices.bringToFront();
 for(int i = 0; i < drug.length; i++){
   TableRow tr =  new TableRow(this);
   TextView c1 = new TextView(this);
   c1.setText(drug[i].getName());
   TextView c2 = new TextView(this);
   c2.setText(String.valueOf(drug[i].getPrice()));
   TextView c3 = new TextView(this);
   c3.setText(String.valueOf(drug[i].getAmount()));
   tr.addView(c1);
   tr.addView(c2);
   tr.addView(c3);
   prices.addView(tr);
 }

代码示例来源:origin: stackoverflow.com

tableLayout.setStretchAllColumns(true);
for (int i = 0; i < 4; i++) {
  TableRow tableRow = new TableRow(this);

代码示例来源:origin: stackoverflow.com

table.setStretchAllColumns(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: sdwfqin/AndroidSamples

mTable1.setStretchAllColumns(true);

代码示例来源:origin: stackoverflow.com

prices.setStretchAllColumns(true);
prices.bringToFront();

代码示例来源:origin: stackoverflow.com

boolean isLastChild,  View convertView,  ViewGroup parent) {
TableLayout layout = new TableLayout(this.context);
layout.setStretchAllColumns(true);
TableRow tr1 = null;
if(groupPosition==0){

代码示例来源:origin: stackoverflow.com

TableLayout prices = (TableLayout)findViewById(R.id.table);
 String[] column1 = getResources().getStringArray(R.array.column1);
 String[] column2 = getResources().getStringArray(R.array.column2);
 String[] column3 = getResources().getStringArray(R.array.column3);
 prices.setStretchAllColumns(true);
 prices.bringToFront();
 for(int i = 0; i < column1.length; i++){
   TableRow tr =  new TableRow(this);
   TextView c1 = new TextView(this);
   c1.setText(column1[i]);
   TextView c2 = new TextView(this);
   c2.setText(column2[i]);
   TextView c3 = new TextView(this);
   c3.setText(column3[i]);
   tr.addView(c1);
   tr.addView(c2);
   tr.addView(c3);
   prices.addView(tr);
 }

代码示例来源:origin: stackoverflow.com

table.setStretchAllColumns(true);
table.setShrinkAllColumns(true);

代码示例来源:origin: stackoverflow.com

table.setStretchAllColumns(true);
table.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
    LayoutParams.MATCH_PARENT));

代码示例来源:origin: stackoverflow.com

table.setStretchAllColumns(true);
table.setShrinkAllColumns(true);

代码示例来源:origin: haibuzou/ExpandTable

titleView = (TextView) rootView.findViewById(R.id.job_name_text);
tableLayout = (TableLayout) rootView.findViewById(R.id.job_name_table);
tableLayout.setStretchAllColumns(true);
setTitleStr(data.getName());

代码示例来源:origin: stackoverflow.com

tl.addView(tr, params);
tl.setStretchAllColumns(true);

代码示例来源:origin: stackoverflow.com

TableLayout dataTable = (TableLayout) findViewById(R.id.maintable);
headerTable.setStretchAllColumns(true);
dataTable.setStretchAllColumns(true);

代码示例来源:origin: fire3/sailorcast

p.setMargins(10,0,10,0);
tableLayout.setLayoutParams(p);
tableLayout.setStretchAllColumns(true);

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

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

相关文章