对于意向屏幕方向变化 [英] Intent for screen orientation change

查看:157
本文介绍了对于意向屏幕方向变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道是否安卓广播的意图时,屏幕方向的变化。我编程的动态壁纸,并希望当屏幕方向改变来对付它。我可以处理同与普通的应用程序。

I'm wondering whether android broadcasts a intent when the screen orientation changes. I am programming a live wallpaper and want to deal with it when the screen orientation changes. I can handle the same with regular apps.

推荐答案

Android系统不广播意图,但默认情况下重新启动该活动。
如果你想忽略这个你应该重写你的活动 onConfigurationChanged(配置)方法。要获得 Android的这种方法叫你还应该指定的变化:在你的manifest文件configChanges 属性

Android system doesn't broadcast an Intent, but restarts the activity by default. If you want to override this you should override onConfigurationChanged(Configuration) method of your activity. To get this method called you should also specify the changing in android:configChanges attribute in your manifest file.

看什么和如何指定 rel=\"nofollow\">。

See what and how to specify here.

这篇关于对于意向屏幕方向变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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