简体   繁体   中英

How to detect screen rotation in android

How to detect screen rotation in android in other words how to catch screen rotation event in android ? does onCreate be called in every rotation ?

Activity has a method onConfigurationChanged() that is a call back for screen rotation when the activity is running. See the documentation for more details:

http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM