id 속성
- Layout XML에 등록되는 View 객체 식별자
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="hello"/>
- findViewById() 함수로 View 객체 획득
val textView1: TextView = findViewById(R.id.text1)
layout_width, layout_height 속성
- 뷰의 사이즈를 지정, 필수 속성
- match_parent, wrap_content, 100dp
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1"
android:backgroundTint="#ff0000"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Button2"
android:backgroundTint="#00ff00"/>
<Button
android:layout_width="150dp"
android:layout_height="150dp"
android:text="Button3"
android:backgroundTint="#0000ff"/>
</LinearLayout>

margin, padding 속성
- margin 은 뷰와 뷰 사이의 간격, padding은 뷰의 컨텐츠와 뷰 테두리 사이의 간격
- padding, margin 속성을 이용하면 4방향 모두 동일한 사이즈로 간격이 설정
- 한 방향의 간격만 설정하고 싶다면 paddingLeft, paddingRight, paddingTop, paddingBottom와 layout_marginLeft, layout_marginRight, layout_marginTop, layout_marginBottom 속성을 이용
visibility 속성
- visibility 속성은 뷰가 화면에 출력되어야 하는지에 대한 설정
- visible(default), invisible, gone 값으로 설정
- invisible 과 gone 은 모두 화면에 뷰가 보이지 않게 하지만 사이즈를 확보하는지에 대한 차이가 있다.