Wednesday, 3 May 2023

How to make buttons change position according to the screen size and/or font size in Android

I have this simple layout with 3 buttons that i need to implement ( which i already did using constraint layout ): enter image description here

But when i have a small screen size or/and the user set the font to max, the texts inside the two large buttons are cut off. To solve this problem, the design team want us to have this layout when these cases happens:

enter image description here

In order to implement these two scenarios, i've tried to use the Flow component from the constraint layout but didn't work for me.

What do you suggest to solve this problem in the same XML file?



from How to make buttons change position according to the screen size and/or font size in Android

No comments:

Post a Comment