本文整理了Java中android.widget.TableRow.setBackgroundColor()
方法的一些代码示例,展示了TableRow.setBackgroundColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableRow.setBackgroundColor()
方法的具体详情如下:
包路径:android.widget.TableRow
类名称:TableRow
方法名:setBackgroundColor
暂无
代码示例来源:origin: stackoverflow.com
row.setBackgroundColor(getResources().getColor(R.color.blue_grey));
} else {
row.setBackgroundColor(getResources().getColor(R.color.white));
代码示例来源:origin: ImmortalZ/jellyball
public void showTable() {
TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(
TableRow.LayoutParams.MATCH_PARENT,
TableRow.LayoutParams.WRAP_CONTENT);
layoutParams.gravity = Gravity.CENTER;
layoutParams.leftMargin = 30;
layoutParams.bottomMargin = 10;
layoutParams.topMargin = 10;
for (int i = 0; i < 30; i++) {
TableRow tableRow = new TableRow(this);
TextView textView = new TextView(this);
textView.setText("Test pull down scroll view " + i);
textView.setTextSize(20);
textView.setPadding(15, 15, 15, 15);
tableRow.addView(textView, layoutParams);
if (i % 2 != 0) {
tableRow.setBackgroundColor(Color.LTGRAY);
} else {
tableRow.setBackgroundColor(Color.WHITE);
}
final int n = i;
tableRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "Click item " + n, Toast.LENGTH_SHORT).show();
}
});
mMainLayout.addView(tableRow);
}
}
代码示例来源:origin: firelotus/Meteorite
TableRow tableheader = new TableRow(getApplicationContext());
tableheader.setBackgroundColor(Color.BLACK);
tableheader.setPadding(0, 2, 0, 2);
for(int k=0;k<c3.getColumnCount();k++)
tableheader2.setBackgroundColor(Color.BLACK);
tableheader2.setPadding(0, 2, 0, 2);
代码示例来源:origin: firelotus/Meteorite
tableRow.setBackgroundColor(Color.BLACK);
tableRow.setPadding(0, 2, 0, 2);
代码示例来源:origin: firelotus/Meteorite
tableheader.setBackgroundColor(Color.BLACK);
tableheader.setPadding(0, 2, 0, 2);
for(int k=0;k<c2.getColumnCount();k++)
getcolumnnames();
TableRow tableheader2 = new TableRow(getApplicationContext());
tableheader2.setBackgroundColor(Color.BLACK);
tableheader2.setPadding(0, 2, 0, 2);
内容来源于网络,如有侵权,请联系作者删除!