Skip to content

Instantly share code, notes, and snippets.

@codingwithsara

codingwithsara/custom_alert.xml Secret

Created Sep 21, 2020
Embed
What would you like to do?
【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
You can’t perform that action at this time.