更新时间:2022-05-13 07:08:35
我面临同样的问题。不知道如果这是一个很好的解决方案,但我发现了解决方法如下:
把 this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
在的setContentView()
中的onCreate( )
活动C.方法并把 this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
在的setContentView()
另外两个活动(A和B)。
I faced the same problem. Dont know if it is a good solution, but the workaround I found is as follows:
Put this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
before the setContentView()
of onCreate()
method of Activity C. And put this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
before the setContentView()
of onCreate()
method of other two Activities (A and B).
任何其他的解决方案是非常AP preciated。
Any other elegant solution is highly appreciated.