Skip to content

Instantly share code, notes, and snippets.

@mezdour
Created January 30, 2018 08:26
Show Gist options
  • Save mezdour/0d48536edd38438371b59d83ed0bfc64 to your computer and use it in GitHub Desktop.
Save mezdour/0d48536edd38438371b59d83ed0bfc64 to your computer and use it in GitHub Desktop.
justJava xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
tools:context="com.example.android.justjava.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quantity"
android:textAllCaps="true"
android:textSize="22sp"
android:textColor="@android:color/darker_gray"
android:layout_margin="16dp"
/>
<Button
android:layout_width="48dp"
android:layout_height="48dp"
android:textColor="#000000"
android:text="+"
android:textSize="22sp"
android:padding="8dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:onClick="quantityPlus"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textSize="22sp"
android:textColor="@android:color/black"
android:layout_margin="16dp"
android:id="@+id/quantity_text_view"
/>
<Button
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:onClick="quantityMines"
android:padding="8dp"
android:text="-"
android:textColor="#000000"
android:textSize="22sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Price"
android:textAllCaps="true"
android:textSize="22sp"
android:textColor="@android:color/darker_gray"
android:layout_margin="16dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="$0"
android:textSize="22sp"
android:textColor="@android:color/black"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:id="@+id/price_text_view"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="Order"
android:textSize="22sp"
android:padding="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:onClick="submitOrder"
/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment