Skip to content

Instantly share code, notes, and snippets.

@pedromassango
Created September 3, 2018 09:37
Show Gist options
  • Save pedromassango/a6dc213823b297931f1ef2e6b6954466 to your computer and use it in GitHub Desktop.
Save pedromassango/a6dc213823b297931f1ef2e6b6954466 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:orientation="vertical">
<TextView
android:id="@+id/dialog_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="21sp" />
<TextView
android:id="@+id/dialog_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:text="@string/app_name"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="20sp" />
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:visibility="visible" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:layout_marginBottom="32dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/dialog_button_one"
style="@android:style/Widget.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@color/colorAccent"
android:orientation="horizontal">
<TextView
android:id="@+id/dialog_button_one_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="10dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="10dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/dialog_button_two"
style="@android:style/Widget.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
android:layout_marginLeft="16dp"
android:background="#b118b1"
android:orientation="horizontal">
<TextView
android:id="@+id/dialog_button_two_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="10dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="10dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment