안드로이드 공부/ 뷰의 영역
6757 단어 안드로이드 UI안드로이드 프로그래밍안드로이드 UI
Margin
- 이 view가 다른 것(ex:부모 view)과 얼마나 안쪽으로 떨어뜨릴지 결정
- ⌨ 예시 코드
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:text="안녕하세요"
android:background="#FD9F9F"
android:layout_marginTop="20dp"
android:layout_marginLeft="50dp"
/>
</LinearLayout>
- 예시 코드 결과
Padding
-
view가 가지고 있는 contents가 얼마나 안쪽으로 떨어뜨릴지 결정
-
⌨ 예시 코드
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:text="안녕하세요"
android:background="#C4FA85"
android:paddingLeft="15dp"
android:paddingTop="30dp"
/>
</LinearLayout>
- 예시 코드 결과
Author And Source
이 문제에 관하여(안드로이드 공부/ 뷰의 영역), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://velog.io/@yellowsummer/안드로이드-공부-뷰의-영역
저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:text="안녕하세요"
android:background="#FD9F9F"
android:layout_marginTop="20dp"
android:layout_marginLeft="50dp"
/>
</LinearLayout>
-
view가 가지고 있는 contents가 얼마나 안쪽으로 떨어뜨릴지 결정
-
⌨ 예시 코드
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="100dp"
android:layout_height="100dp"
android:text="안녕하세요"
android:background="#C4FA85"
android:paddingLeft="15dp"
android:paddingTop="30dp"
/>
</LinearLayout>
- 예시 코드 결과
Author And Source
이 문제에 관하여(안드로이드 공부/ 뷰의 영역), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@yellowsummer/안드로이드-공부-뷰의-영역저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)