📱 Android/🔍 UI
[Android/UI] 10. Frame Layout(프레임 레이아웃)
h_json
2022. 10. 19. 10:53
728x90
Frame Layout
• 자식 뷰를 가질 수 있는 컨테이너 뷰
• 액자에 뷰를 넣는다.
• 먼저 xml에 적힌 자식 뷰가 맨 아래 층에 깔린다.
- 즉, 나중에 적힌 자식 뷰가 먼저 적힌 자식 뷰를 가린다.
• 중첩이 필요할 때 사용한다.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="300dp"
android:layout_height="300dp"
android:background="#FF0000" />
<TextView
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#00FF00" />
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:background="#0000FF" />
</FrameLayout>

이 글은
패스트 캠퍼스 Android 앱 개발의 정석 with Kotlin 올인원 패키지 Online
강의를 듣고 공부한 내용을 바탕으로 작성되었습니다.
728x90