?android:attr/selectableItemBackground

Maxwell Weru picture Maxwell Weru · Jun 10, 2012 · Viewed 31.1k times · Source

when writing my android app i used

android:background="?android:attr/selectableItemBackground"

I tried looking for attr.xml file that would be containing the source but i could not find it. Any ideas please on where i can find it. I found one attr.xml in

C:\Program Files (x86)\Android\android-sdk\platforms\android-13\data\res\values

but it did not have the attribute mentioned above. Can anyone lead me where I can find the xml resource with the attribute above?

Answer

Gautam picture Gautam · Jul 9, 2012

I'm not that experienced with Android, but I think you can find what you're looking for in "data\res\values\themes.xml".

If you search in that file for "selectableItemBackground", you should find the following:

<style name="Theme">
...
        <item name="selectableItemBackground">@android:drawable/item_background</item>
...
</style>

You'll also find respective entries for Theme.Holo.Light and Theme.Holo. The *"item_background"*, *"item_background_holo_light"*, and *"item_background_holo_dark"* drawables would be located in the "data\res\drawable" folder.

Hope that helps!