Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created June 15, 2018 07:51
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 ssaurel/487269769250a1fe66bbf19aa27efb78 to your computer and use it in GitHub Desktop.
Save ssaurel/487269769250a1fe66bbf19aa27efb78 to your computer and use it in GitHub Desktop.
UI for the Roulette Game Tutorial on the SSaurel's Channel
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/spinBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="SPIN"
android:layout_marginBottom="15dp"
/>
<TextView
android:id="@+id/resultTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="15dp"
android:textSize="32sp"
android:layout_centerHorizontal="true"
android:text=""/>
<ImageView
android:id="@+id/wheel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:scaleType="centerInside"
app:srcCompat="@drawable/wheel"
android:adjustViewBounds="true" />
<ImageView
android:id="@+id/triangle"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerHorizontal="true"
android:layout_above="@id/wheel"
android:layout_marginBottom="-10dp"
app:srcCompat="@drawable/triangle"
/>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment