589
No
RelativeLayout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="kr.co.dothome.braverokmc.tutorial10.MainActivity">
<Button
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:text="상"
/>
<Button
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="하"
/>
</RelativeLayout>
TableLayout
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<TableRow>
<Button
android:text="가"
/>
<Button
android:layout_span="2"
android:text="나"
/>
<Button
android:text="다"
/>
</TableRow>
<TableRow>
<Button
android:layout_column="1"
android:text="라"
/>
<Button
android:text="마"
/>
</TableRow>
</TableLayout>
GridLayout
<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="4"
android:rowCount="3"
>
<Button
android:layout_column="0"
android:layout_row="0"
android:layout_rowSpan="2"
android:layout_gravity="fill_vertical"
android:text="가"
/>
<Button
android:layout_column="1"
android:layout_row="0"
android:layout_columnSpan="3"
android:layout_gravity="fill_horizontal"
android:text="나"
/>
<Button
android:layout_column="2"
android:layout_row="1"
android:text="다"
/>
</GridLayout>
FrameLayout
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<RatingBar
android:layout_width="30dp"
android:layout_height="100dp" />
<TextView
android:id="@+id/textView"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="가" />
</FrameLayout>
LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="버튼"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="텍스트 뷰"
/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="체크박스"
/>
</LinearLayout>
댓글 ( 4)
댓글 남기기