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
3 Answers
+ 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
+ 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.
0
is it possible to achieve it by just using the linearlayout only?