WEB/Kotlin
[안드로이드 스튜디오 / XML] 레이아웃 구성 익히기(2)
Gh1324
2021. 10. 18. 01:22
728x90
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_launcher"
android:scaleType="fitCenter"/>
fitcenter : 가운데 정렬
레이아웃기본 레이아웃 : constraint layout
레이아웃 속성orienteation :
Vertical : 리니어 레이아웃 안에 포함될 위젯의 배치를 수직방향으로 쌓음
Horizontal : 수평 방향으로 쌓겠다는 의미
<pre style="font-family: 굴림체; font-size: 9pt;"><LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:layout_editor_absoluteX="-37dp"
tools:layout_editor_absoluteY="41dp"></pre>
gravity : 기본적으로 왼쪽으로 배치.
<LinearLayout | <Button |
baselineAligned : 레이아웃 정렬
true/false
layout_weight : 레이아웃 여러개 사용할때 레이아웃 크기 지정함.
padding...
margin vs padding
margin : 위젯과 위젯 사이의 간격
padding : 위젯 내의 테두리와 컨텐트의 간격
728x90