I want to make a custom Dialog
. Because I don't like its style, I want to have rounded rectangle rather than sharp corners. I know how to implement it by theme in AndroidManifest.xml
, for example, I use:
android:theme="@style/Theme.CustomDialog"
And Theme.CustomDialog.xml
:
<style name="Theme.CustomDialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/filled_box</item>
<item name="android:windowNoTitle">true</item>
filled_box.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff"/>
<stroke android:width="3dp" color="#ffff8080"/>
<corners android:radius="30dp" />
<padding android:left="10dp" android:top="10dp"
android:right="10dp" android:bottom="10dp" />
</shape>
How can I implement a similar result by extending the Dialog
or AlertDialog
?