com.google.api.services.bigquery.model.TableRow.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.3k)|赞(0)|评价(0)|浏览(117)

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

TableRow.<init>介绍

暂无

代码示例

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

TableRow tr = new TableRow(this);  
TableLayout.LayoutParams tableRowParams=
 new TableLayout.LayoutParams
 (TableLayout.LayoutParams.FILL_PARENT,TableLayout.LayoutParams.WRAP_CONTENT);

int leftMargin=10;
int topMargin=2;
int rightMargin=10;
int bottomMargin=2;

tableRowParams.setMargins(leftMargin, topMargin, rightMargin, bottomMargin);

tr.setLayoutParams(tableRowParams);

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

// reference the table layout
TableLayout tbl = (TableLayout)findViewById(R.id.RHE);
// delcare a new row
TableRow newRow = new TableRow(this);
// add views to the row
newRow.addView(new TextView(this)); // you would actually want to set properties on this before adding it
// add the row to the table layout
tbl.addView(newRow);

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

TableRow tr1 = new TableRow(this);
for (Entry<String, Integer> entry : map.entrySet()) {
   tv.setText(entry.getKey());
   tv2.setText((Integer)entry.getValue()); //Error occures here
   tv.setGravity(Gravity.LEFT);
   tv2.setGravity(Gravity.RIGHT);
   tr1.addView(tv);
   tr1.addView(tv2);
   tl.addView(tr1, new TableLayout.LayoutParams(
       LayoutParams.FILL_PARENT,
       LayoutParams.WRAP_CONTENT));
   }
 }

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

TableLayout layout = (TableLayout)mainLayout.findViewById(R.id.my_table_layout_id);

for(int i = 0; i < 10; i++) {
  row = new TableRow(this);
  View layout_number = inflater.inflate(R.layout.inflate_number, layout, false);
  TextView number = (TextView) layout_number.findViewById(R.id.Number);
  number.setTag(i);
  number.setText(Integer.toString(i));
  row.addView(number);
  layout.addView(row);
}

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

fixedView.setBackgroundColor(Color.BLUE);
  fixedColumn.addView(fixedView);
  row = new TableRow(this);
  row.setLayoutParams(wrapWrapTableRowParams);
  row.setGravity(Gravity.CENTER);
recyclableTextView = new TextView(this);
recyclableTextView.setText(text);
recyclableTextView.setTextColor(Color.BLACK);

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

TableRow tr = new TableRow(this);
tr.removeAllViews();
tr.setPadding(0,10,0,10);
tr.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
TextView tv_item1 = new TextView(this);
TextView tv_item2 = new TextView(this);
TextView tv_item3 = new TextView(this);

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

// Retrieve some elements from the layout
 TableLayout table = (TableLayout)findViewById(R.id.button_table);
 TableRow row = (TableRow)findViewById(R.id.button_row_0);
 NiceButton origButton = (NiceButton)findViewById(R.id.button_0);
 // Prepare button 0
 origButton.setId(0);
 origButton.setText("Button 0");
 origButton.setOnClickListener(mNiceButtonClickListener);
 mButtonViews[0] = origButton;
 // Create buttons 1 to 10
 for (int i = 1; i < 10; i++) {
   if (i % 2 == 0) {
     row = new TableRow(this);
     table.addView(row);
   }
   NiceButton button = new NiceButton(i, origButton);
   button.setText("Button " + i);
   button.setOnClickListener(mNiceButtonClickListener);
   mButtonViews[i] = button; 
   row.addView(button);
 }

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

for (int i = 0; i < newslist.size(); i++) {
   TableRow row = new TableRow(this);
      row.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
          LayoutParams.WRAP_CONTENT));
      news1 = (news) newslist.get(i);
      txtview.setText(new1.getTitle());
      System.out.println(new1.getTitle());
      row.addView(txtview);
      tb.addView(row);
}

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

/* Find Tablelayout defined in main.xml */
TableLayout tl = (TableLayout) findViewById(R.id.SaleOrderLines);
/* Create a new row to be added. */
TableRow tr = new TableRow(this);
tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
/* Create a Button to be the row-content. */
Button b = new Button(this);
b.setText("Dynamic Button");
b.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.FILL_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
/* Add Button to row. */
tr.addView(b);
/* Add row to TableLayout. */
//tr.setBackgroundResource(R.drawable.sf_gradient_03);
tl.addView(tr, new TableLayout.LayoutParams(TableLayout.LayoutParams.FILL_PARENT, TableLayout.LayoutParams.WRAP_CONTENT));

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

protected void onCreate(Bundle savedInstanceState) { 
  super.onCreate(savedInstanceState); 
  // Setup this activity's view. 
  setContentView(R.layout.game_board); 

  TableLayout table = (TableLayout) findViewById(R.id.table); 

  int gridSize = 5;
  // Create the table elements and add to the table. 
  int uniqueId = 1; 
  for (int i = 0; i < gridSize; i++) { 
    // Create table rows. 
    TableRow row = new TableRow(this); 
    row.setId(uniqueId++);
    for (int j = 0; j < gridSize; j++) {
      // Create buttons.
      Button button = new Button(this);
      button.setId(uniqueId++);
      row.addView(button);
    }
    // Add row to the table.
    table.addView(row);
  }
}

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

foreach (news new1 : newslist) {
   TableRow row = new TableRow(this);
   row.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
       LayoutParams.WRAP_CONTENT));
   txtview.setText(new1.getTitle());
   System.out.println(new1.getTitle());
   row.addView(txtview);
   tb.addView(row);
 }

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

TableLayout table = new TableLayout(this);
// Java. You succeed!
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
    ViewGroup.LayoutParams.FILL_PARENT,
    ViewGroup.LayoutParams.FILL_PARENT);
table.setLayoutParams(lp);
table.setStretchAllColumns(true);

TableLayout.LayoutParams rowLp = new TableLayout.LayoutParams(
    ViewGroup.LayoutParams.FILL_PARENT,
    ViewGroup.LayoutParams.FILL_PARENT,
    1.0f);
TableRow.LayoutParams cellLp = new TableRow.LayoutParams(
    ViewGroup.LayoutParams.FILL_PARENT,
    ViewGroup.LayoutParams.FILL_PARENT,
    1.0f);
for (int r = 0; r < 2; ++r)
{
  TableRow row = new TableRow(this);
  for (int c = 0; c < 2; ++c)
  {
    Button btn = new Button(this);
    btn.setText("A");
    row.addView(btn, cellLp);
  }
  table.addView(row, rowLp);
}
setContentView(table);

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

TableRow tr = new TableRow(...);
TableLayout.LayoutParams lp = 
new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT,
               TableLayout.LayoutParams.WRAP_CONTENT);

lp.setMargins(10,10,10,10);             
tr.setLayoutParams(lp);

------

// the key is here!
yourTableLayoutInstance.addView(tr, lp);

代码示例来源: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);
  for (int j = 0; j < 10; j++) {
    LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    tableRow.addView(cell);
  tableLayout.addView(tableRow);

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

for(int i=0 ; i < 2 ; i++) {
TableRow tr = new TableRow(this);


  tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));
  tr.setBackgroundResource(R.drawable.border);

linearUserPicture = new View(); //DON'T COPY THIS! re create your view as you did it before every time
  tr.addView(linearUserPicture); // INITIALIZE linearUserPicture every loop!
tl.addView(tr, new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.MATCH_PARENT));
}

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

public class MainActivity
   extends Activity
   implements View.OnClickListener {
   @Override
   public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     TableLayout layout = new TableLayout (this);
     layout.setLayoutParams( new TableLayout.LayoutParams(4,5) );
     layout.setPadding(1,1,1,1);
     for (int f=0; f<=13; f++) {
       TableRow tr = new TableRow(this);
       for (int c=0; c<=9; c++) {
         Button b = new Button (this);
         b.setText(""+f+c);
         b.setTextSize(10.0f);
         b.setTextColor(Color.rgb( 100, 200, 200));
         b.setOnClickListener(this);
         tr.addView(b, 30,30);
       } // for
       layout.addView(tr);
     } // for
     super.setContentView(layout);
   } // ()
   public void onClick(View view) {
     ((Button) view).setText("*");
     ((Button) view).setEnabled(false);
   }
 } // class

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

// PSEUDOCODE
TableRow newRow = new TableRow(this);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(/*....*/);
newRow.setLayoutParams(lp);

relLayout.add(newRow);

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

HSV.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
TableRow tblRow = new TableRow(this);
tblRow.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
tblRow.setBackgroundResource(R.drawable.bookshelf);
  imageView.setImageResource(R.drawable.book1);
  TextView textView = new TextView(this);
  textView.setText("Java Tester");
  textView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
  tblRow.addView(imageView,j);
tblLayout.addView(HSV, i);

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

TableLayout caseTable = (TableLayout) findViewById(R.id.caseTable);
   TableRow caseRow = new TableRow(this);
   caseRow.setOrientation(TableRow.VERTICAL);
   EditText name = new EditText(this);
   //name.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT, TableLayout.LayoutParams.WRAP_CONTENT));
   name.setText("Name __");
   caseRow.addView(name);
   caseTable.addView(caseRow,new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT, TableLayout.LayoutParams.WRAP_CONTENT));

相关文章