开发者

How does my android activity knows when the device changes in orientation

Can you please tell me how do开发者_如何学Goes my android activity know (is there a callback) when there is a change in screen orientation?

Thank you.


Take a look at Activity's public void onConfigurationChanged(Configuration newConfig) method:

http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged%28android.content.res.Configuration%29

Watch out for this:

Note that this will only be called if you have selected configurations you would like to handle with the configChanges attribute in your manifest.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜