Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created October 29, 2019 12:57
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/9930df798f571f4ec2ece7e8ea30c4bb to your computer and use it in GitHub Desktop.
Save codingwithsara/9930df798f571f4ec2ece7e8ea30c4bb to your computer and use it in GitHub Desktop.
AlertDialog Customize 2-1
<?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">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="タイトル"
android:textSize="20sp"
android:padding="10dp"
android:textColor="@android:color/white"
android:background="@color/colorAccent"
android:textAlignment="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:mipmap/sym_def_app_icon"
android:layout_margin="10dp"
android:layout_gravity="center"/>
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="メッセージ"
android:textSize="16sp"
android:textColor="@android:color/black"
android:padding="8dp"/>
<Button
android:id="@+id/btnPositive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:layout_margin="8dp"
android:layout_gravity="right"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment