0

9 button android help

im still a beginner in android.how do i make an app with 9 buttons.3 columns and in each column there are 3 buttons vertically.what should i write in the main.xml

11th Nov 2017, 8:23 PM
oyl
3 odpowiedzi
+ 2
Try using a GridLayout with 3 columns and 3 rows with a button in each. https://developer.android.com/reference/android/widget/GridLayout.html
11th Nov 2017, 8:54 PM
ChaoticDawg
ChaoticDawg - avatar
+ 2
Yes, you'll need to nest three horizontal linearlayouts with 3 buttons in each all inside a vertical linearlayout, but it really may be easier to just nest a gridlayout inside your current layout and then set it up appropriately.
12th Nov 2017, 12:44 AM
ChaoticDawg
ChaoticDawg - avatar
0
is it possible to achieve it by just using the linearlayout only?
12th Nov 2017, 12:38 AM
oyl