开发者

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

开发者 https://www.devze.com 2023-01-17 02:05 出处:网络
Can you please tell me how do开发者_如何学Goes my android activity know (is there a callback) when there is a change in screen 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

精彩评论

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