기초 - UI 버튼, LinearLayout

 

LinearLayout 일때 버튼을 중앙에 위치하는 법

 

 

문제>

LinearLayout 에서 버튼을 만들고 중앙에 위치하고 싶어서 align 이라고 타이핑하니 android:textAlignment="" 만 나온다.

당연히 이건 아니다.

 

 

해결>

android:layout_gravity="center" 를 사용하니 해결된다.

 

 

출처>

안드로이드 개발자 사이트

https://developer.android.com/guide/topics/ui/layout/linear

 

728x90

+ Recent posts