问题描述
我有一些可点击的视图,我想设置列表点击(在ICS中是一个蓝色)上存在的默认可用背景。我已经尝试作为背景:
android:background =@ android:drawable / list_selector_background
但它不是我默认的蓝色(我使用的是橙色)。默认情况下,在android上作为点击选择器使用的drawable是什么?
感谢
它是 list_selector_holo_dark
或等效全息灯版本;这些是Honeycomb及以上的默认值。 list_selector_background
是非完整版,用于Gingerbread及以下版本。
EDIT :我相信(但无法确认)平台无关选择器
I have some clickable views and I want to set the default available background that is present on list click (in ICS is a blue color). I have tried putting as background this:
android:background="@android:drawable/list_selector_background"
but it is not the default blue I have by default (the one I used is orange). What is the drawable used by default on android as click selector?
Thanks
It's list_selector_holo_dark
or the equivalent holo light version; and these are the defaults in Honeycomb and above. list_selector_background
is the non-holo version, used in Gingerbread and below.
EDIT: I believe (but can't confirm) that the platform agnostic selector is ?android:attr/listSelector
这篇关于可点击视图中的默认选择器背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!