Where Layout Inspector shows where is the ID

Issue

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 @ids 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

Solution

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

Answered By – Nikos Hidalgo

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published