Disable animations in material bottom sheet
This commit is contained in:
parent
bea7e18357
commit
8c234f64f3
2 changed files with 9 additions and 0 deletions
|
@ -390,6 +390,11 @@
|
|||
|
||||
<!-- Dialog popup -->
|
||||
<style name="Animations"/>
|
||||
|
||||
<style name="Animations.NoAnimation">
|
||||
<item name="@android:windowEnterAnimation">@null</item>
|
||||
<item name="@android:windowExitAnimation">@null</item>
|
||||
</style>
|
||||
<!-- PopDownMenu -->
|
||||
<style name="Animations.PopDownMenu"/>
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.view.ContextThemeWrapper;
|
|||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -43,6 +44,9 @@ public class SnapToRoadBottomSheetDialogFragment extends android.support.design.
|
|||
@Override
|
||||
public void setupDialog(Dialog dialog, int style) {
|
||||
super.setupDialog(dialog, style);
|
||||
if (getMyApplication().getSettings().DO_NOT_USE_ANIMATIONS.get()) {
|
||||
dialog.getWindow().setWindowAnimations(R.style.Animations_NoAnimation);
|
||||
}
|
||||
|
||||
nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
|
||||
portrait = AndroidUiHelper.isOrientationPortrait(getActivity());
|
||||
|
|
Loading…
Reference in a new issue