Android Dialog宽度match_parent

Dialog满宽的两种方式

首先为Dialog设置Style

 <style name="MyTheme.Dialog" parent="@android:style/Theme.Dialog">
        <item name="android:windowFrame">@null
        
        "android:windowIsFloating">true
        
        "android:windowIsTranslucent">false
        
        "android:windowNoTitle">true
        
        "android:windowBackground">@android:color/transparent
        "android:backgroundDimEnabled">true
        
        "android:windowFullscreen">true
        
    style>

方式一