A sentimental robot

GridLayout2 본문

Android Studio

GridLayout2

GOD03219 2018. 2. 5. 13:31

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.i310_54.myapplication08.MainActivity"

>

<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="4"
android:rowCount="3"
>

<Button android:text="Button" android:layout_row="0" android:layout_column="0"
android:layout_columnSpan="2" android:layout_rowSpan="2"
android:layout_gravity="fill"
/>
<!-- <Button android:text="Button" android:layout_row="0" android:layout_column="1"/>-->
<Button android:text="Button" android:layout_row="0" android:layout_column="2"/>
<Button android:text="Button" android:layout_row="0" android:layout_column="3"
android:layout_rowSpan="2" android:layout_gravity="fill_vertical"/>
<!--<Button android:text="Button" android:layout_row="1" android:layout_column="0"/>
<Button android:text="Button" android:layout_row="1" android:layout_column="1"/>-->
<Button android:text="Button" android:layout_row="1" android:layout_column="2"/>
<!--<Button android:text="Button" android:layout_row="1" android:layout_column="3" />-->
<Button android:text="Button" android:layout_row="2" android:layout_column="0"
android:layout_columnSpan="4" android:layout_gravity="fill_horizontal"/>
<!--<Button android:text="Button" android:layout_row="2" android:layout_column="1" />
<Button android:text="Button" android:layout_row="2" android:layout_column="2"/>
<Button android:text="Button" android:layout_row="2" android:layout_column="3" />-->

</GridLayout>


</LinearLayout>

 

'Android Studio' 카테고리의 다른 글

RelativeLayout  (0) 2018.02.06
Handler  (0) 2018.02.05
GridLayout  (0) 2018.02.05
배경색 자동으로 바꾸기  (0) 2018.02.01
TableLayout  (0) 2018.02.01