A sentimental robot

LinearLayout 본문

Android Studio

LinearLayout

GOD03219 2018. 1. 12. 15:21
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1"
android:background="#aaaaaa"
tools:context="com.example.i310_54.myapplication01.MainActivity">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:layout_weight="0.5"
android:background="#d42b10"
android:gravity="center"
>


<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="match_parent"

android:text="Button" />

<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />

<Button
android:id="@+id/button4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
android:orientation="horizontal"
android:weightSum="1"
android:background="#2359bf">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:background="#fff000"
android:orientation="vertical"
android:gravity="center"
>

<Button
android:id="@+id/button9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />

<Button
android:id="@+id/button8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />

<Button
android:id="@+id/button7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:layout_weight="0.5"
android:background="#1138ac">

<Button
android:id="@+id/button10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />

<Button
android:id="@+id/button11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:text="Button" />
</LinearLayout>
</LinearLayout>

</LinearLayout>

 



 

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

ListView  (0) 2018.01.29
Spinner  (0) 2018.01.29
메소드를 공유하는 위젯  (0) 2018.01.12
익명클래스를 이용해서 이벤트리스너 만들기  (0) 2018.01.11
안드로이드를 시작하기 전에..  (0) 2018.01.11