本文整理了Java中android.widget.TableRow.setBackgroundResource()
方法的一些代码示例,展示了TableRow.setBackgroundResource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableRow.setBackgroundResource()
方法的具体详情如下:
包路径:android.widget.TableRow
类名称:TableRow
方法名:setBackgroundResource
暂无
代码示例来源:origin: WowzaMediaSystems/gocoder-sdk-samples-android
private void setRowBackground(TableRow row) {
row.setBackgroundResource(mRowNumber % 2 == 0 ? R.color.dataTableRowBackground1 : R.color.dataTableRowBackground2);
mRowNumber++;
}
代码示例来源:origin: mathisdt/trackworktime
private void refreshRowHighlighting(DateTime monday, DateTime tuesday, DateTime wednesday, DateTime thursday,
DateTime friday, DateTime saturday, DateTime sunday) {
DateTime today = DateTimeUtil.getCurrentDateTime();
mondayRow.setBackgroundResource(today.isSameDayAs(monday) ? R.drawable.table_row_highlighting
: R.drawable.table_row);
tuesdayRow.setBackgroundResource(today.isSameDayAs(tuesday) ? R.drawable.table_row_highlighting : 0);
wednesdayRow.setBackgroundResource(today.isSameDayAs(wednesday) ? R.drawable.table_row_highlighting
: R.drawable.table_row);
thursdayRow.setBackgroundResource(today.isSameDayAs(thursday) ? R.drawable.table_row_highlighting : 0);
fridayRow.setBackgroundResource(today.isSameDayAs(friday) ? R.drawable.table_row_highlighting
: R.drawable.table_row);
saturdayRow.setBackgroundResource(today.isSameDayAs(saturday) ? R.drawable.table_row_highlighting : 0);
sundayRow.setBackgroundResource(today.isSameDayAs(sunday) ? R.drawable.table_row_highlighting
: R.drawable.table_row);
}
代码示例来源:origin: WowzaMediaSystems/gocoder-sdk-samples-android
private void addSubSectionHeader(TableLayout table, String label, boolean annotateCollections) {
if (label != null) {
TableRow row = new TableRow(getActivity());
row.setBackgroundResource(R.color.dataTableSubHeaderBackground);
TableRow.LayoutParams rowParams = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
row.setLayoutParams(rowParams);
内容来源于网络,如有侵权,请联系作者删除!