Skip to content

Instantly share code, notes, and snippets.

@nniksa91 nniksa91/activity_main.xml
Last active Jan 23, 2017

Embed
What would you like to do?
Android Studio Development
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#ffffff"
android:padding="16dp"
tools:context="com.example.android.justjava.MainActivity">
<TextView
android:text="QUANTITY"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAllCaps="true"
android:textSize="16sp"
android:textColor="#bbbbbb"
android:layout_marginBottom="16dp"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:text="+"
android:onClick="increment"
android:layout_marginRight="10dp"
android:layout_width="48dp"
android:layout_height="48dp" />
<TextView
android:id="@+id/quantity_text_view"
android:text="0"
android:textColor="@android:color/black"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textSize="16sp"
/>
<Button
android:text="-"
android:onClick="decrement"
android:layout_marginLeft="10dp"
android:layout_width="48dp"
android:layout_height="48dp" />
</LinearLayout>
<TextView
android:text="Price"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAllCaps="true"
android:textSize="16sp"
android:textColor="#bbbbbb"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
/>
<TextView
android:text="$0"
android:id="@+id/price_text_view"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textAllCaps="true"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginBottom="16dp"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAllCaps="true"
android:onClick="submitOrder"
android:background="#bbbbbb"
android:text="ORDER"
android:padding="16dp"
android:textSize="16sp"
/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.