Skip to content

Instantly share code, notes, and snippets.

@LambergaR
Created October 4, 2011 07:05
Show Gist options
  • Save LambergaR/1261055 to your computer and use it in GitHub Desktop.
Save LambergaR/1261055 to your computer and use it in GitHub Desktop.
Android Layout Demo Simple
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/shades"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerVertical="true"
>
<ImageView
android:layout_width="0px"
android:layout_height="match_parent"
android:background="#CCC"
android:layout_weight="1"
/>
<ImageView
android:layout_width="0px"
android:layout_height="match_parent"
android:background="#EEE"
android:layout_weight="2"
/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/shades"
android:layout_centerHorizontal="true"
android:text="Here Be Dragons"
android:gravity="center_horizontal"
android:background="#666"
android:paddingLeft="20dp"
android:paddingRight="20dp"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment