Relative Layout Example 3
<
RelativeLayout
xmlns:android
=
"http://schemas.android.com/apk/res/android"
xmlns:tools
=
"http://schemas.android.com/tools"
android:layout_width
=
"match_parent"
android:layout_height
=
"match_parent"
>
<
Button
android:id
=
"@+id/button1"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button1"
android:layout_alignParentLeft
=
"true"
android:layout_alignParentTop
=
"true"
/>
<
Button
android:id
=
"@+id/button2"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button2"
android:layout_alignParentRight
=
"true"
android:layout_alignParentTop
=
"true"
/>
<
Button
android:id
=
"@+id/button3"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button3"
android:layout_alignParentBottom
=
"true"
android:layout_alignParentLeft
=
"true"
/>
<
Button
android:id
=
"@+id/button4"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button4"
android:layout_alignParentBottom
=
"true"
android:layout_alignParentRight
=
"true"
/>
<
Button
android:id
=
"@+id/button5"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button5"
android:layout_centerInParent
=
"true"
/>
<
Button
android:id
=
"@+id/button6"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button6"
android:layout_toLeftOf
=
"@id/button5"
android:layout_above
=
"@id/button5"
/>
<
Button
android:id
=
"@+id/button7"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button7"
android:layout_toRightOf
=
"@id/button5"
android:layout_above
=
"@id/button5"
/>
<
Button
android:id
=
"@+id/button8"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button8"
android:layout_toRightOf
=
"@id/button5"
android:layout_below
=
"@id/button5"
/>
<
Button
android:id
=
"@+id/button9"
android:layout_width
=
"wrap_content"
android:layout_height
=
"wrap_content"
android:text
=
"@string/button9"
android:layout_toLeftOf
=
"@id/button5"
android:layout_below
=
"@id/button5"
/>
</
RelativeLayout
>
Relative Layout Example 3
Reviewed by Anonymous
on
December 26, 2015
Rating:
No comments: