如何才能知道是否窗口动画的设置启用 [英] How do I find out if window animations are enabled in settings

查看:167
本文介绍了如何才能知道是否窗口动画的设置启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,我可以开始设置,活动以

I know, I can start the Settings-Activity with

Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
startActivityForResult(intent,1);

不过,我怎么知道,如果动画在第一时间被启用?

But how do I know if the animations are enabled in the first place?

我有一个自定义视图内的动画,只是想表现出来,如果​​动画在设置中启用。如果他们是残疾人,我想问的用户,让他们在第一时间,他启动应用程序。

I have an animation inside a custom view and only want to show it, if the animations are enabled in the settings. If they are disabled, I'd like to ask the user to enable them the first time he starts the application.

推荐答案

查看<一个href="http://developer.android.com/reference/android/provider/Settings.System.html">http://developer.android.com/reference/android/provider/Settings.System.html.

您可以阅读标志:

  • TRANSITION_ANIMATION_SCALE
  • WINDOW_ANIMATION_SCALE

如果他们是0,则动画被禁用。

If they are 0, then animations are disabled.

这篇关于如何才能知道是否窗口动画的设置启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆