【发布时间】:2013-10-14 10:59:59
【问题描述】:
我正在使用 ActionBarSherlock 库。我的 CameraActivity 的样式设置为全屏:
<activity
android:name="pl.toptof.android.ui.activity.CameraActivity"
android:theme="@style/Theme.Styled.NoActionBar.fullScreen"
android:screenOrientation="portrait">
</activity>
当我从这个活动开始新活动时:
Intent intent = new Intent(CameraActivity.this, PreviewActivity.class);
intent.putExtra("PhotoURI",takenPhotoURL);
intent.putExtra("voteID",voteId);
CameraActivity.this.startActivity(intent);
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>
此问题仅出现在 Sony Xperia Z 设备上。在 HTC Legend、HTC One、Nexus 4、三星 Galaxy S3、Nexus 7、三星 Galaxy Note 上运行良好。以及它的屏幕:
有什么解决办法吗?
【问题讨论】:
-
如何将全屏属性添加到布局中??
-
好吧...这可以解决问题,但我不想在 PreviewAcivity 中全屏显示。我想以适当的方式处理它。
-
windowmanager 确实允许您在活动开始时将其设置为全屏。你可以在你想要的全屏活动中使用它而不是 previewsactivity
-
好的,我已经尝试过了,但是我需要一些时间才能给您回复,我没有 Xperia Z,所以我无法测试它 - 我必须等待客户回复。但如果有人有任何其他想法,我很乐意尝试。
-
没问题,慢慢来
标签: android android-actionbar actionbarsherlock statusbar