Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Hierarchy Viewer for Android App Widget

Is it possible to use Hierarchy Viewer for App Widget? If yes, how? and is there any Tutorial for that?

like image 529
ratulalahy Avatar asked May 05 '26 20:05

ratulalahy


1 Answers

Have you tried using Hierarchy Viewer for UI elemements? I followed these instructions yesterday and they worked fine for me.

To run Hierarchy Viewer, you can follow these steps:

  1. Connect your device or launch an emulator.
    To preserve security, Hierarchy Viewer can only connect to devices running a developer version of the Android system.
  2. If you have not done so already, install the application you want to work with.
  3. Run the application, and ensure that its UI is visible.
  4. From a terminal (command prompt), launch hierarchyviewer from the /tools/ directory.
  5. The first window you see displays a list of devices and emulators. To expand the list of Activity objects for a device or emulator, click the arrow on the left. This displays a list of the Activity objects whose UI is currently visible on the device or emulator. The objects are listed by their Android component name. The list includes both your application Activity and system Activity objects. A screenshot of this window appears in figure 1.
  6. Select the name of your Activity from the list. You can now look at its view hierarchy using the View Hierarchy window, or look at a magnified image of the UI using the Pixel Perfect window.

Since this will not work on a stock Android system you must use either a developer version or an emulator.

Please! check here

Please let me know if these instructions don't work for app widgets or if you have more questions.

like image 98
Egis Avatar answered May 08 '26 09:05

Egis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!