LinearLayout - 모든 자식 뷰들을 한 방향으로(세로 또는 가로) 지정하는 레이아웃을 의미 orientation을 지정해야 함
orientation - 방향을 의미
vertical - 세로를 의미
width - 가로를 의미
height - 세로를 의미
가로(width)는 match_parent(부모를 의미) 입력
세로(height)는 wrap_content(텍스트 크기 만큼 세로 길이를 감싸라 라는 의미) 입력
텍스트 사이즈 단위는 sp
activity_main.xml
-----------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmls:android="http://schemas.android.com/apk/res/android"
xmls:app="http://schemas.android.com/apk/res-auto"
xmls:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#03E2FF"
android:textSize="20sp"
android:text="khon98"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#076057"
android:textSize="40sp"
android:text="khon01"/>
</LinearLayout>
-----------------------------------------------
'안드로이드 앱 만들기' 카테고리의 다른 글
패키지구조 & 역할 (0) | 2020.08.01 |
---|---|
Image View & Toast (0) | 2020.08.01 |
intent 화면전환 (0) | 2020.08.01 |
EditText & Button (0) | 2020.07.28 |
안드로이드 개발자 모드(USB 디버깅) 설정방법 (0) | 2020.07.25 |