I am a novice programmer, and I have a problem with disabling the animation of the dialog box (disappear and disappear).
I tried to use an empty style and set it by changing
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
in
final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(getActivity(), R.style.NoAnimation));
The background of the dialog box turned black, positive and negative button presses changed to <2.1 - 4.0) Android style, but the disappearance and disappearance of the animation effect remained ...
My style:
<style name="DialogNoAnimation"> <item name="android:windowEnterAnimation">@anim/enter</item> <item name="android:windowExitAnimation">@anim/exit</item> </style> <style name="NoAnimation" parent="@android:style/Theme.Dialog"> <item name="android:windowAnimationStyle">@style/DialogNoAnimation</item> </style>
Any ideas how I can remove this animation?
source share