开发者

Get Android List Selected Background Color

开发者 https://www.devze.com 2023-03-06 11:47 出处:网络
My activity uses a TableView layout and I have it coded to set the background to a color (dr开发者_StackOverflow社区awable state list) when pressed/focused.

My activity uses a TableView layout and I have it coded to set the background to a color (dr开发者_StackOverflow社区awable state list) when pressed/focused.

I would like the color to be the theme's pressed/focused color of the ListView.

Does anyone know the android default color for the ListView pressed or focused state?


You can use this android.R.drawable.list_selector_background. Its the statelist drawable that android uses to show pressed focussed and other states on listviews.

0

精彩评论

暂无评论...
验证码 换一张
取 消