Skip to content

Instantly share code, notes, and snippets.

@KonstantinSchubert
Created June 28, 2015 15:38
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 KonstantinSchubert/897ff2646238bfd6fb3e to your computer and use it in GitHub Desktop.
Save KonstantinSchubert/897ff2646238bfd6fb3e to your computer and use it in GitHub Desktop.
layout xml for activity
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/enter_workload">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Hours spent attending"
android:id="@+id/workload_attending_label" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="@+id/workload_attending_edit"
android:layout_weight="0.3" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Hours spent doing homework"
android:layout_weight="0.7"
android:id="@+id/workload_homework_label" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:layout_weight="0.3"
android:id="@+id/workload_homework_edit" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Hours spent studying"
android:id="@+id/workload_studying_label" />
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="@+id/workload_studying_edit"
android:layout_weight="0.3"/>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment