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 icon, its Layout Inspector. When you will click Layout Inspector Button, it will ask for the layout (activity) you want to see. Select the one you want and you will get a snapshot same as below image.
As you can see the Inspector consists of three parts (from left to right).
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.
Be the first to comment.