반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Realtime Database
- 문자열
- Alamofire
- string
- ios
- remote config
- Android
- subscript
- swipe
- Java
- 웹뷰
- Firebase
- 다크모드
- WebView
- 라이트모드
- UITabBarController
- NavigationLink
- Apple
- Observable
- SwiftUI
- RxSwift
- UIButton
- dictionary
- UIScrollView
- gcd
- autolayout
- github
- LazyHStack
- SwiftLint
- Swift
Archives
- Today
- Total
점진적 과부하 개발 블로그
Android 테이블 레이아웃/ 상대적 레이아웃 본문
반응형
안드로이드 테이블 레이아웃/ 상대적 레이아웃 정리
테이블 레이아웃
- 예제
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TableRow>
<TextView android:text="나이"/>
<EditText android:text="24"/>
</TableRow>
<TableRow>
<TextView android:text="성별"/>
<EditText android:text="남"/>
</TableRow>
<TableRow>
<Button android:text="저장"/>
<Button android:text="취소"/>
</TableRow>
</TableLayout>
실행화면
상대적 레이아웃
속성 | 설명 |
layout_above | 만약 true이면 현재 뷰의 하단을 기준 뷰의 위에 일치시킨다. |
layout_below | 현재 뷰의 상다을 기준 뷰의 하단에 위치시킨다. |
layout_centerHorizontal | 수평으로 현재 뷰의 중심을 부모와 일치시킨다. |
layout_centerInParent | 부모의 중심점에 현재 뷰를 위치시킨다. |
layout_centerVertical | 수직으로 현재 뷰의 중심을 부모와 일치시킨다. |
layout_toLeftOf | 현재 뷰의 우측단을 기준 뷰의 좌측단에 위치시킨다. |
layout_toRightOf | 현재 뷰의 좌측단을 기준 뷰의 우측단에 위치시킨다. |
반응형
'Android' 카테고리의 다른 글
Android 14주차 (0) | 2022.06.13 |
---|---|
Android RxJava (0) | 2022.05.23 |
Android 가중치(weight) (0) | 2022.04.17 |
Android에서 이미지뷰 사용 (0) | 2022.04.16 |
Android 사용자 인터페이스 기초 (0) | 2022.04.15 |