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
- ReactNative
- docker-compose
- docker
- AWS
- Swift
- map
- CLASS
- animation
- collection
- list
- Interface
- vuex
- mongoose
- MINUS
- Kotlin
- 생명주기
- function
- Service
- class component
- elementAt
- lifecycle
- react native
- Generic
- LiveData
- recyclerview
- enum
- ConstraintLayout
- Foreign Key
- Filter
- union
Archives
- Today
- Total
개발 일기
ConstraintLayout - Guideline 본문
Gulideline
화면을 그릴 때 가이드 라인을 그릴수가 있습니다.
따라서 비율 및 시작점 혹은 끝점을 기준으로 위치를 설정할수가 있습니다.
방향 설정
android:orientation="horizontal|vertical"
위치 설정
퍼센트로 설정
app:layout_constraintGuide_percent="0.3"
시작 위치 끝나는 위치 설정
app:layout_constraintGuide_begin="24dp"
app:layout_constraintGuide_end="16dp"
예제
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toEndOf="@+id/guideline"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@color/colorPrimary"
/>
<androidx.constraintlayout.widget.Guideline
android:layout_width="0dp"
android:layout_height="0dp"
android:id="@+id/guideline"
app:layout_constraintGuide_begin="80dp"
android:orientation="vertical" />
</androidx.constraintlayout.widget.ConstraintLayout>
'Client > 안드로이드' 카테고리의 다른 글
ConstraintLayout - Flow (0) | 2020.05.22 |
---|---|
ConstraintLayout - Group (0) | 2020.05.21 |
ConstraintLayout - Barrier (0) | 2020.05.21 |
ConstraintLayout - Chains (0) | 2020.05.20 |
Intent Flag ? (0) | 2020.05.19 |
Comments