Android Question B4A Buttons Alignment

Nataly

Member
Hello I have multiple buttons that I want to center, I also want these buttons to adapt with screen sizes, for example on tablet, these four buttons must be in one row since they can fit all together on the tablet's screen.

1634654566481.png


Thank you,
Nataly
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I have multiple buttons that I want to center
Put them in a panel and use the designer script:
B4X:
Panel1.CenterHorizontal = 50%x
Panel1.CenterVertical = 50%y

these four buttons must be in one row since they can fit all together on the tablet's screen
Use two layout variants. One for small devices and one for tablets.
 
Upvote 0
Top