Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug android UI styles

Please do you know about any tool which would allow me to debug Android UI in the way web debug tools work? I mean view which style is applied to each particular View, or also I would like to be able to see some inheritance tree etc..Do you guys know about something like that?

like image 580
simekadam Avatar asked Jul 06 '13 08:07

simekadam


People also ask

How do I run a layout inspector?

To open the Layout Inspector, run your app on a connected device or emulator, and then select Tools > Layout Inspector.

Should I enable GPU debug layers?

There's no reason to use them unless you're a developer testing an app. Debug GPU overdraw: This uses color-coding to visualize how many times the same pixel has been drawn in the same frame. The visualization shows where an app might be doing more rendering than necessary.


1 Answers

The only way I know of to look which style is applied is to look in xml. Simply search for Style and you'll be able to go through them one at a time, but something like web debug doesn't exist as far as I know.

Inheritance trees for styles are also not present and you'll have to go through them the hard way (writting on paper or something). In general android styles is a pain to learn but when you've learned to navigate it you'll be able to live with it :)

like image 59
Warpzit Avatar answered Dec 15 '22 18:12

Warpzit