DialogFragment背景shape圆角bottom无效

DialogFragment背景shape底部圆角无效

问题的shape

<?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 可以避免这个问题

<?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-width

你可能感兴趣的:(背景,shape)