Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created September 21, 2020 00: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 codingwithsara/86bc071b2c548dfe9601d2af2e82cde8 to your computer and use it in GitHub Desktop.
Save codingwithsara/86bc071b2c548dfe9601d2af2e82cde8 to your computer and use it in GitHub Desktop.
【Android Studio】How to Display Custom AlertDialog
<?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="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal"
android:padding="14dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:mipmap/sym_def_app_icon"/>
<TextView
android:id="@+id/msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="message"
android:textSize="18sp"
android:layout_marginTop="10dp"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment