Skip to content

Instantly share code, notes, and snippets.

@Garretthh07
Last active April 27, 2016 16:26
Show Gist options
  • Save Garretthh07/3e94e57cbf9d3bb5c9d016679d963d6e to your computer and use it in GitHub Desktop.
Save Garretthh07/3e94e57cbf9d3bb5c9d016679d963d6e to your computer and use it in GitHub Desktop.
JustJava activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<EditText
android:id="@+id/name_field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name"
android:inputType="textCapWords" />
<TextView
style="@style/HeaderTextStyle"
android:text="@string/toppings" />
<CheckBox
android:id="@+id/whipped_cream_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Whipped Cream"
android:layout_marginLeft="16dp"
android:textSize="16sp"
android:paddingLeft="24dp"/>
<CheckBox
android:id="@+id/chocolate_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Chocolate"
android:layout_marginLeft="16dp"
android:textSize="16sp"
android:paddingLeft="24dp"/>
<TextView
style="@style/HeaderTextStyle"
android:text="@string/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:layout_marginLeft="20dp"
android:onClick="decrement"
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="@string/quantity_of_coffee"
android:textColor="@android:color/black"
android:textSize="26sp" />
<Button
android:layout_width="48dp"
android:layout_height="48dp"
android:onClick="increment"
android:text="+" />
</LinearLayout>
<TextView
style="@style/HeaderTextStyle"
android:text="@string/ordersummary" />
<TextView
android:id="@+id/order_summary_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="@string/price_all_coffee"
android:textColor="@android:color/black"
android:textSize="26sp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="16dp"
android:onClick="submitOrder"
android:text="Order" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="16dp"
android:onClick="openMap"
android:text="Open Map" />
</LinearLayout>
</ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment