Android10关闭过渡动画缩放
关闭该动画----------1、在WindowManagerService中定义 过渡动画缩放 默认的级别private float mTransitionAnimationScaleSetting = 1.0f;2、在WindowManagerService的构造方法中,重新赋值mTransitionAnimationScaleSetting = Settings.Global.getFloa
·
关闭该动画
----------
1、在WindowManagerService中定义 过渡动画缩放 默认的级别
private float mTransitionAnimationScaleSetting = 1.0f;
2、在WindowManagerService的构造方法中,重新赋值
mTransitionAnimationScaleSetting = Settings.Global.getFloat(resolver,
Settings.Global.TRANSITION_ANIMATION_SCALE,
context.getResources().getFloat(
R.dimen.config_appTransitionAnimationDurationScaleDefault));
3、在DatabaseHelper中加载默认值
loadFractionSetting(stmt, Settings.System.TRANSITION_ANIMATION_SCALE,
R.fraction.def_window_transition_scale, 1);
4、修改R.fraction.def_window_transition_scale的值即可
- <fraction name="def_window_transition_scale">100%</fraction>
+ <fraction name="def_window_transition_scale">0%</fraction>
5、修改AnimatorDurationScalePreferenceController文件,在Settings源码中
- static final float DEFAULT_VALUE = 1;
+ static final float DEFAULT_VALUE = 0;
0为关闭
<!-- Titles for transition animation scale preference. [CHAR LIMIT=35] -->
<string-array name="transition_animation_scale_entries">
<item>Animation off</item>
<item>Animation scale .5x</item>
<item>Animation scale 1x</item>
<item>Animation scale 1.5x</item>
<item>Animation scale 2x</item>
<item>Animation scale 5x</item>
<item>Animation scale 10x</item>
</string-array>
<!-- Values for transition animation scale preference. -->
<string-array name="transition_animation_scale_values" translatable="false" >
<item>0</item>
<item>.5</item>
<item>1</item>
<item>1.5</item>
<item>2</item>
<item>5</item>
<item>10</item>
</string-array>
更多推荐
已为社区贡献1条内容
所有评论(0)