티스토리 뷰
FrameLayout
FrameLayout에서 children은 나타나는 순서대로 z-index로 표시된다.
즉, 마지막에 추가된 children이 모든 children의 위에 그려진다.
스택이라고 생각하면 될 것이다. 이 레이아웃은 다른 레이아웃 위에 버튼을 배치할 때 사용하기에 편리하다.
예제
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Child1 is drawn first -->
<ImageView
android:id="@+id/child1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="Image"
android:src="@drawable/icon" />
<!-- Child2 is drawn over Child1 -->
<TextView
android:id="@+id/child2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Child 2"
android:layout_gravity="top|left" />
<!-- Child3 is drawn over Child1 and Child2 -->
<TextView
android:id="@+id/child3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Child 3"
android:layout_gravity="top|right" />
</FrameLayout>실행결과
추후 추가 예정
'android' 카테고리의 다른 글
| [안드로이드] RecyclerView ( ListView와 차이 ) (0) | 2018.07.04 |
|---|---|
| [안드로이드] ListView, ArrayAdapter 사용하기 (1) | 2018.07.04 |
| [안드로이드] TextInputLayout, EditText (hint/placeholder, error message, 문자열 counting, password visibility) (0) | 2018.06.29 |
| [안드로이드] view layouts (2) RelativeLayout, PercentRelativeLayout (0) | 2018.06.28 |
| [안드로이드] view layouts (1) LinearLayout (0) | 2018.06.28 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- RelativeLayout
- 운영체제
- 스프링
- WinDbg
- OS
- 백준
- ConstraintLayout
- Android
- DATABASE
- 정렬 알고리즘
- layout
- LinearLayout
- 안드로이드
- C++
- 윈도우
- 백준알고리즘
- C
- windows
- debug
- BOJ
- 이진탐색트리
- HTTP
- adapter
- handshake
- frameLayout
- 네트워크
- listview
- 퀵정렬
- 알고리즘
- 스프링부트
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함