When developing HTML5 webpages with CSS and javascript, I've found DOM inspectors like Chrome Developer Tools extremely helpful in root causing which CSS styles are being applied to which HTML5 elements on a webpage. The interface allows you to see the actual layout on the left, along with the DOM, with the CSS being applied to the page dynamically at that moment.
My question is - does any tool exist that is similar to this for Android applications? Is there a way to identify which xml styles are being applied to which elements in an activity or application? This would be particularly helpful in seeing the "default" styles.xml in an application.
Does anyone have any suggested tools to help figure out what styles are being applied to each element in an activity?
Android does not keep the styling information after a View is created. The closest thing you can use is a tool called HierarchyViewer. You can learn more about this tool here: http://developer.android.com/tools/debugging/debugging-ui.html
You should also checkout http://github.com/romainguy/ViewServer to be able to use HierarchyViewer on production devices (we plan on making this requirement obsolete.)
I have created an app for Android which aspires to be a close match to developer tools known from web browsers. Of course it's only a mere startup and can't match functionality of counterparts designed to inspect web pages, also it can't match what is possible with official desktop tools like the Layout Inspector from the Android Studio.
It has one advantage however, it works offline (directly on the device, no need to use ADB, any SDK etc.).
If you are interested, enjoy the Developer Assistant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With