Android row column onSelect background
来源:互联网 发布:自动供料机的plc编程 编辑:程序博客网 时间:2024/05/01 13:59
<!--Even row --><?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@color/selected" /> <item android:state_selected="true" android:drawable="@color/selected" /> <item android:state_focused="true" android:drawable="@color/selected" /> <item android:drawable="@color/even_row" /> <item android:state_selected="true" android:state_focused="false" android:state_pressed="false" android:drawable="@color/even_row" /></selector>
<!--Odd row --><?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/selected" />
<item android:state_selected="true" android:drawable="@color/selected" />
<item android:state_focused="true" android:drawable="@color/selected" />
<item android:state_selected="true" android:state_focused="false" android:state_pressed="false" android:drawable="@android:color/transparent" />
</selector>java code:
for (String data:rowData){ TextView col = new TextView(context); col.setTextAlignment(TextView.TEXT_ALIGNMENT_CENTER); col.setText(data); col.setTextSize(24); if (clickable){ if (table.getChildCount()%2==0) col.setBackgroundResource(R.drawable.table_selector_odd); else col.setBackgroundResource(R.drawable.table_selector_even); } row.addView(col, col1Params); }
0 0
- Android row column onSelect background
- column vs. row
- row column cell
- QTableView add row background-iamge
- COLUMN-TOTAL/ROW-TOTAL关键词:
- row-major 和column-major
- ecside table row column 属性
- QTableView add Control row BackGround image
- android background
- android:background
- fail to read row 0,column -1
- codechef Row and Column Operations 题解
- boost sparse matrix row and column
- Set row and column to 1's
- jquey delegate add delete row and column
- Data truncated for column at row
- Column AND Row Posted by David Dobrin
- flex的row和column居中
- Hibernate 中的悲观锁和乐观锁
- 我也有自己的博客了
- Ubuntu输入法设置
- SQLSERVER如何获取一个数据库中的所有表的名称、一个表中所有字段的名称
- 把git的diff文件打成zip包
- Android row column onSelect background
- JVM3:Jvm堆
- mysql 中使用 concat 函数 拼接字符串
- shell脚本 给linux上的用户群发信息
- Linux hdparm命令测试硬盘速度
- ASP.NET MVC 5 - 给电影表和模型添加新字段
- JSP三大编译指令 page指令 include指令 taglib指令
- Django模板继承
- Understanding Layouts in SWT