Android Tutorial [Tool] Enhance your layouts with the "Layout bounds" developer option

The creation of layouts is very easy with the B4A Designer.

With more complex forms, however, it can happen that the result looks a bit weird. Usually the heights or distances between the labels are different, but this is not immediately noticeable during development.

2019-02-25_07-40-38.jpg
To avoid slowing down productivity with time-consuming adjustment and control, Android has a helpful tool in the developer options: "Show layout bounds".

The use during development is easiest via a Quick tile (4).

Activation of the tile:
(1) Developer Options ON
(2) quick settings developer tiles
(3) Show layout bounds​

2019-02-25_07-53-11.jpg


All user interface elements will be marked with their borders (5).
Now it is possible to achieve a pixel-precise arrangement of the elements.

2019-02-25_08-39-01.jpg

A further tool then might help with the exact analysis of the distances: https://play.google.com/store/apps/details?id=com.scheffsblend.designertools
 

GMan

Well-Known Member
Licensed User
Longtime User
Is this for AndroidStudio Users only ?
 

AnandGupta

Expert
Licensed User
Longtime User
Thanks a lot fredo, for the information :)

I found that it is also available in titles (more). This is great help for checking the design of a running app, even other's apps to get the idea.

Also found under 'Developer', 'show taps' and 'pointer location', which are also very useful. Only there is no titles for them, to quickly enable/disable.

Redmi 4 ver 10.1, Android 7.1

Regards,

Anand
 
Top