Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find reference resource implementation in Android studio?

I mean, is it possible now to see platform's(exact sdk) implementation of reference attr?

enter image description here

This time I'm using Android Studio v2.3 and 3.0

like image 570
Kirill Vashilo Avatar asked Dec 19 '25 04:12

Kirill Vashilo


1 Answers

selectableItemBackground is an attribute, that is specified in themes.

For a reference you can see how topmost Theme style specifies that attribute, which is declared in themes.xml.

<style name="Theme">
    ...
    <item name="selectableItemBackground">@drawable/item_background</item>
    <item name="selectableItemBackgroundBorderless">?attr/selectableItemBackground</item>
    ...
</style>

As to the question: "How to find reference resource implementation in Android studio?" - what you can do, is perform a search inside Android Studio with query "theme_material". That file, as the name applies, contains material themes, alternatively you can search for "themes" for non-material themes.

enter image description here

Also, you can make use of Android Studio's "Find in Path" feature:

enter image description here

In above screenshot you can see that I've specified search directory to point to SDK sources (in my case it's "/Users/azizbekian/Library/Android/sdk/platforms/android-27") and search query "selectableitembackground">

like image 166
azizbekian Avatar answered Dec 21 '25 19:12

azizbekian