Center a button in a Linear layout

后端 未结 19 1382
遇见更好的自我
遇见更好的自我 2020-12-04 04:55

I am using a linear layout to display a pretty light initial screen. It has 1 button that is supposed to centre in the screen both horizontally and vertically. However no

19条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 05:27

    As per the Android documentation for XML Attributes of android:layout_gravity, we can do it easily :)

    
    
    
        
    
    
    

提交回复
热议问题