A
A
Alexander Barchuk2014-06-17 21:40:26
Android
Alexander Barchuk, 2014-06-17 21:40:26

How to position buttons on a given layout in Android?

How to describe xml markup in android to make buttons like this?
13a081b0c90247d39adad978047dff67.png
The goal is for the buttons on all devices to be straight and square.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Yakushev, 2014-06-18
@Devcolibri

1. LinearLayout with layout_width="match_parent" and 5 buttons, each with layout_width = 0dp and layout_weight = 1; ( code examples )
2. GridLayout with 1 row and five cells ( code examples )
PS: learn to use Google search ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question