Reputation: 23
I have my interface implemented with ActionBarSherlock, and it works great with the newest android versions. But this android 2.1 to android 2.3, it keeps the older title bar, I can't find a way to remove it.
I've already tried:
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) {
if (actionBar != null) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
}
}
With the android Window object and Sherlock's Window object. Can't make thar bar go away...
Upvotes: 2
Views: 1421
Reputation: 11
Example:
<style name="Theme.MyApp" parent="Theme.Sherlock.Light.NoActionBar">
so you can apply this theme to your activity in AndroidManifest file:
<activity android:theme="@style/Theme.MyApp"></activity>
Upvotes: 1
Reputation: 299
res/values/style.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="@android:style/Theme.Black.NoTitleBar" />
</resources>
res/values-v11/style.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="@android:style/Theme.Holo.NoActionBar" />
</resources>
In AndroidManifest.xml:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
...
</application>
Upvotes: 1