Skip to content

Instantly share code, notes, and snippets.

@incorelabs
Created February 28, 2018 01:49
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 incorelabs/f75bc3b419966b2e385f9c7e0625f375 to your computer and use it in GitHub Desktop.
Save incorelabs/f75bc3b419966b2e385f9c7e0625f375 to your computer and use it in GitHub Desktop.
A gist for activity
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.company.letsgetcoffee.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<EditText
android:id="@+id/name_field"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="Name"
android:inputType="text" />
<TextView
android:layout_width="wrap_content"
android:layout_height="48dp"
android:gravity="center_vertical"
android:text="Toppings"
android:textAllCaps="true"
android:textSize="15sp" />
<CheckBox
android:id="@+id/whipped_cream_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="24dp"
android:text="Whipped Cream"
android:textSize="16sp" />
<CheckBox
android:id="@+id/chocolate_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="24dp"
android:text="Chocolate"
android:textSize="16sp" />
<TextView
style="@style/HeaderTextStyle"
android:text="Quantity" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="48dp"
android:layout_height="48dp"
android:text="-" />
<TextView
android:id="@+id/quantity_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="2"
android:textColor="@android:color/black"
android:textSize="16sp" />
<Button
android:layout_width="48dp"
android:layout_height="48dp"
android:text="+" />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Order" />
</LinearLayout>
</ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment