DialogFragment设置自定义动画

getDialog().getWindow().getAttributes().windowAnimations = R.style.CustomDialog;


    <style name="CustomDialog" parent="@android:style/Theme.Dialog">
        <item name="android:windowBackground">@android:color/white</item>
        <item name="android:backgroundDimEnabled">false</item><!--activity不变暗-->
        <item name="android:background">@android:color/transparent</item>
        <item name="android:windowEnterAnimation">@anim/push_bottom_in</item>
        <item name="android:windowExitAnimation">@anim/push_bottom_out</item>
    </style>


你可能感兴趣的:(DialogFragment设置自定义动画)