DialogFragment背景shape圓角bottom無效

DialogFragment背景shape底部圓角無效android

問題的shapemarkdown

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/white" />
    <corners android:radius="5dp" />

</shape>

經過設置shape 的padding 能夠避免這個問題spa

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/white" />
    <corners android:radius="5dp" />
    **<padding  android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" />**

</shape>

參考:http://stackoverflow.com/questions/15421271/custom-fragmentdialog-with-round-corners-and-not-100-screen-widthcode

相關文章
相關標籤/搜索