Skip to content

Instantly share code, notes, and snippets.

@i906
Created January 2, 2015 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i906/da7a2766fef79aa19653 to your computer and use it in GitHub Desktop.
Save i906/da7a2766fef79aa19653 to your computer and use it in GitHub Desktop.
<LinearLayout 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"
tools:context=".MainActivity"
android:baselineAligned="false"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:background="#3F51B5"
android:orientation="vertical"
android:padding="8dp">
<TextView
android:id="@+id/tv_results_bmi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
tools:text="23.7"
style="@style/TextAppearance.AppCompat.Display4" />
<TextView
android:id="@+id/tv_results_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-16dp"
android:layout_marginBottom="16dp"
android:text="@string/label_enter_weight_height"
tools:text="Ideal Weight"
style="@style/TextAppearance.AppCompat.Subhead" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:baselineAligned="false"
android:showDividers="middle"
android:divider="@android:drawable/divider_horizontal_bright"
android:padding="8dp">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/primary"
android:padding="8dp">
<EditText
android:id="@+id/et_height"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/label_height"
android:gravity="center"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/et_height"
android:layout_centerHorizontal="true"
android:text="@string/unit_meter"
style="@style/TextAppearance.AppCompat.Small"
android:id="@+id/tv_height_unit" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/primary"
android:padding="8dp">
<EditText
android:id="@+id/et_weight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/label_weight"
android:gravity="center"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/et_weight"
android:layout_centerHorizontal="true"
android:text="@string/unit_kilogram"
style="@style/TextAppearance.AppCompat.Small"
android:id="@+id/et_weight_unit" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment