Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 android 中检测屏幕旋转,换句话说如何在 android 中捕获屏幕旋转事件?onCreate每次轮换都会调用吗?
onCreate
Activity 有一个方法onConfigurationChanged()是在 Activity 运行时回调屏幕旋转。有关更多详细信息,请参阅文档:
onConfigurationChanged()
http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)