Place 3 buttons in a LinearLayout to occupy equal amount of space

前端 未结 9 1604
滥情空心
滥情空心 2021-01-31 14:50

i would like to have three buttons taking equal amount of available space horizontally in a row. I used android:layout_gravity. What is the problem?

layout

9条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 15:20

    Put the buttons in a relative layout. add properties to the buttons allignParentleft = true, another allignParentcenter= true and the allignParentRight = true to each button.

提交回复
热议问题