Three Tools Every Android UI developer should know

BoredBlogger
2 min readApr 16, 2023

--

I am not a big fan of UI development. Sometimes the effort to show a button at some particular location and manage its position in all kind of orientation is painful. That’s for another day. In this article I write about 3 UI tools that makes life easier for UI developers. All theses 3 are built in. All you need to do to use these, is enable Developer Options. In developer mode search for Quick settings developer tiles. Go inside and enable :

  1. Show layout bounds
  2. Force RTL direction
  3. Window animation scale

Show Layout Bounds:

If I had a nickel for every time this tool has helped in figuring out why a view is misplaced I would be a millionaire. This tool shows to which view your view is constrained and the margin that is applied to it. I also sometimes use it on my personal phone to see how the developer of other apps are composing their view. Below is the screenshot from the Medium app. The views will have a colored rectangle around them. The semi-transparent red area you see is the margin that is applied to the view. Starting at the constraint and ending at the view.

Medium app when Show layout bonds enabled

Force RTL layout direction

There are few languages that start at the right, opposite to most of the languages. You have to ensure when those languages are used on the user's device the view doesn’t misbehave. To reproduce or for you to verify you will have to change the device language to one of the Right to left languages, and if you are not familiar with the language you will be lost. Force RTL layout direction is here for your rescue. You can enable this setting without changing your device setting. As this is also part of quick settings enabling and disabling this is easy. You can switch to RTL as and when you wish while developing. Below is screenshot of Medium App with RTL enabled. In this process also found a bug in Medium app ;). Bell icon and Home button are overlapping in case of RTL.

Window animation scale

If you develop a lot of animations and you want your animations to be perfect this option is for you. When you enable this option all the animations slow down. If you are animating your views and combining multiple animations together slowing it down helps you to figure if the behavior is as expected.

That’s all for today.

--

--