pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.1k stars 256 forks source link

Switch layout bounds added as a new command #130

Open amin-amini opened 3 years ago

amin-amini commented 3 years ago

In this branch I've added an option to switch "Show Layout Bounds" I've always needed this option on my IDE and other options such as the command in terminal, or Dev Tools app does not fit very well specially when you are running on multiple devices and have to worry about the -s option and an adb devices😃. As a result, I've decided to create a plugin and found your great repo and forked it.

I would be so happy if you merge this feature in the plugin so others can also use it

How I did this: I've added ResponseReceiver class which keeps the executed command's response using a data class called ResponseHolder and then I run getprop debug.layout to see if it is enabled or not. After that, I call setprop debug.layout false/true and subsequently, I poke the system to refresh settings using service call activity 1599295570 https://susuthapa19961227.medium.com/enable-layout-debugging-in-android-using-adb-64016d755441