Android
Android Studio 레이아웃 연습2
rlaxogns2
2016. 5. 27. 18:55
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:background="@drawable/layout_border" android:layout_width="match_parent" android:layout_height="200dp"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:text="여기에 입력" /> </LinearLayout> <LinearLayout android:orientation="horizontal" android:background="#0000ff" android:layout_width="match_parent" android:layout_height="wrap_content"> <Button android:text="save" android:layout_width="190dp" android:layout_weight="1" android:layout_height="wrap_content" /> <Button android:text="cancle" android:layout_width="190dp" android:layout_weight="1" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:background="#0000ff" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:text="Exit" android:layout_weight="1" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout> | cs |
레이아웃 세개를 만들었다. TextView와 Save + Cancle 버튼 그리고
EXIT 버튼을 각각 레이아웃으로 지정하여 정렬 하였다.
*실행결과