Reputation: 413
How can I using Android studio 3.0 see which part of code is corresponding to the layout on my emulator?
The most logical way would be to refer to the single @id
s but from the tool Layout Inspector
but how can i see the name of the layout(or nested layouts) that are appearing on the snapshot? And the name of the single Ids?
If I open the View Tree
I do not see any specific Id( the ones are actually in the code but some generics ID that descend by a generic Decor View
with id as id/toolbaar
or id/0x0
instead of the real part of the code where I want to go
Upvotes: 2
Views: 1992
Reputation: 3756
In the Properties table under properties, you should see an attribute by the name of mID. That's the id you're looking for.
EDIT after comment: For newer versions of Android Studio (eg Dolphin), There is a tab on the left side of the layout inspector menu (Tools -> Layout Inspector) called "Components". This holds the entire tree with the views hierarchy. Expanding it all the way reveals the view IDs and their values
Upvotes: 2