使用ActionBarSherlock在设备上运行的API&LT全屏模式; 11 [英] Fullscreen Mode using ActionBarSherlock on Devices running API <11
问题描述
有没有办法使用ActionBarSherlock在设备上运行的API&LT在全屏模式去; 11
更多信息:
我的应用程序使用ActionBarSherlock,并同时测试在不同设备上我无意中发现了一个问题。
如果我尝试卓推出全屏的活动
安卓主题=@安卓风格/ Theme.NoTitleBar.Fullscreen
这是一个API低于11以下出错运行的设备:
十月5日至29日:12:54.436:E / AndroidRuntime(1034):致命异常:主要
10月5日至29日:12:54.436:E / AndroidRuntime(1034):java.lang.RuntimeException的:无法启动的活动ComponentInfo {de.osthessennews.osthessennewsapp / com.example.listview.PlayVideo}:java.lang.IllegalStateException:你必须使用Theme.Sherlock,Theme.Sherlock.Light,Theme.Sherlock.Light.DarkActionBar,或其衍生物。
出现的错误辩论,因为在清单中的行不支持的设备上运行的API&LT; 11。
所以我知道是什么原因造成的问题,但我不知道如何解决它。我希望你们的人能帮助我。
清单中摘录:
&lt;应用
机器人:allowBackup =真
机器人:图标=@可绘制/ ic_launcher
机器人:标签=@字符串/ APP_NAME
机器人:主题=@风格/ Theme.Sherlock&GT;
&GT;
您可以做编程方式:
this.getWindow()。setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
使用前的setContentView()
。
Is there a way to go in fullscreen mode using ActionBarSherlock on Devices running API <11?
Further Information:
My app is using ActionBarSherlock and while testing on different devices i stumbled on a problem.
If i try tro launch an activity in fullscreen
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
on a Device running on a API lower than 11 the following error occured:
05-29 10:12:54.436: E/AndroidRuntime(1034): FATAL EXCEPTION: main
05-29 10:12:54.436: E/AndroidRuntime(1034): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.osthessennews.osthessennewsapp/com.example.listview.PlayVideo}: java.lang.IllegalStateException: You must use Theme.Sherlock, Theme.Sherlock.Light, Theme.Sherlock.Light.DarkActionBar, or a derivative.
The error occurs, cuz the Line in the Manifest isn't supported for Devices running on API's < 11.
So i know what is causing the problem, but i dont know how to resolve it. I hope one of you guys can help me.
Manifest Snipped:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Sherlock" >
>
You Can do Programmatically :
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Use before setContentView()
.
这篇关于使用ActionBarSherlock在设备上运行的API&LT全屏模式; 11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!