Android 从全屏活动启动新活动会导致状态栏覆盖操作栏

Android 从全屏活动启动新活动会导致状态栏覆盖操作栏,android,android-actionbar,actionbarsherlock,statusbar,Android,Android Actionbar,Actionbarsherlock,Statusbar,我正在使用ActionBarSherlock库。我有CameraActivity,其样式设置为全屏: <activity android:name="pl.toptof.android.ui.activity.CameraActivity" android:theme="@style/Theme.Styled.NoActionBar.fullScreen" android:screenOrientation="portrait"> </activity>

我正在使用ActionBarSherlock库。我有CameraActivity,其样式设置为全屏:

<activity
   android:name="pl.toptof.android.ui.activity.CameraActivity"
   android:theme="@style/Theme.Styled.NoActionBar.fullScreen"
   android:screenOrientation="portrait">
</activity>
活动看起来像是停留在全屏模式,状态栏可见,并覆盖我的操作栏。预展活动的主题是:

<application
        android:name="(...)"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:hardwareAccelerated="true"
        android:theme="@style/Theme.Styled">

<activity
            android:name="pl.toptof.android.ui.activity.PreviewActivity"
            android:screenOrientation="portrait">
</activity>

这个问题只出现在索尼Xperia Z设备上。在HTC Legend、HTC One、Nexus 4、三星Galaxy S3、Nexus 7、三星Galaxy上,注意它工作正常。和它的屏幕:


有没有办法解决这个问题?

问题已经解决了。我所做的是:

我已经修改了这种开始新活动的方式

Intent intent = new Intent(CameraActivity.this, PreviewActivity.class);
intent.putExtra("PhotoURI",takenPhotoURL);
intent.putExtra("voteID",voteId);
CameraActivity.this.startActivity(intent);
添加

getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

星前触觉法。这有点棘手,但状态栏在活动结束前向下滑动,一切正常。当我再次返回/启动CameraActivity时,它会再次获得FLAG_FULLSCREEN onCreate。

将FULLSCREEN属性添加到布局中如何?是的。。。这可以解决问题,但我不想在预览功能全屏。我希望以正确的方式处理它。windowmanager允许您在活动开始时将其设置为全屏。你可以在活动中使用它,你想要全屏而不是预览活动好的,我已经尝试过了,但这需要时间,直到我能给你答复,我没有Xperia Z,所以我不能测试它-我必须等待客户的答复。但如果有人有其他想法,我很乐意尝试。没问题,慢慢来
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);