In Android Studio 2.2 we got a new tool Layout Inspector. Its still in its early phase but it is supposed to the replace the Hierarchy Viewer of Android when its complete. The layout Inspector as the name suggests inspects the layout of the device or emulator. Currently Layout inspector shows you a snapshot of your device / emulator and you can see all the views and their respective properties in it.
You can launch it from Android Monitor , but firstly you have to launch your application on the device / emulator. After launching app go to android studio and select your device and application. Then in the left most tool-bar over there you will find
As you can see the Inspector consists of three parts (from left to right).
- Its the view hierarchy i.e all the views you are having on that screen.
- The center pane shows the snapshot of you device (exactly as it looks in your device).
- The rightmost is the property pane that shows all the properties a selected view holds like click-able, visible, active etc.
When you select a particular view in view hierarchy its position is shown n snapshot and the corresponding properties are loaded in properties pane. The similar thing happens if you select a particular view in snapshot pane.
Note: If on click of any view you can’t see it in the snapshot then there is a posiblity that it is hindered with some other view on it. In this case you can right click on that view in hierarchy pane and uncheck the Show in preview checkbox.