How we can create CustomAlertbox in Android
In this blog i will tell you how you can creat Custom alertbox in android
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="30dp"
>
<EditText
android:id="@+id/write_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter your name"
android:padding="20dp"/>
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<Button
android:id="@+id/cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"
android:text="Cancel"
android:layout_margin="5dp"
/>
<Button
android:id="@+id/save"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"
android:text="save"
android:layout_margin="5dp"
/>
</LinearLayout>
</LinearLayout>
Post a Comment