カスタムしたいDialog
。私はそのスタイルが気に入らないので、尖った角ではなく丸みを帯びた長方形にしたいと考えています。でテーマごとに実装する方法を知っていますAndroidManifest.xml
。たとえば、次を使用します。
android:theme="@style/Theme.CustomDialog"
そして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>
orを拡張して同様の結果を実装するにはどうすればよいですDialog
かAlertDialog
?