Reputation: 37
i have been looking for solutions for hours. i'm trying to split my action bar but it keeps stacking up in the top-right corner. this is my menu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:balloonberry="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
balloonberry:showAsAction="always"/>
<item android:id="@+id/action_location_found"
android:icon="@drawable/ic_action_location_found"
android:title="@string/action_location_found"
balloonberry:showAsAction="always"/>
<item android:id="@+id/action_refresh"
android:icon="@drawable/ic_action_refresh"
android:title="@string/action_refresh"
balloonberry:showAsAction="always"/>
<item android:id="@+id/action_help"
android:icon="@drawable/ic_action_help"
android:title="@string/action_help"
balloonberry:showAsAction="always"/>
<item android:id="@+id/action_check_updates"
android:icon="@drawable/ic_action_refresh"
android:title="@string/action_check_updates"
balloonberry:showAsAction="always"/>
</menu>
this is my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zapp.exampleproject1" >
<uses-sdk android:minSdkVersion="17"></uses-sdk>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppCompat.Light"
android:uiOptions="splitActionBarWhenNarrow">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow`" />
</activity>
</application>
</manifest>
any solutions???? (i'm using a android 4.3 phone)
Upvotes: 1
Views: 46
Reputation: 1006584
Neither appcompat-v7
, nor the native action bar on Android 5.0+, support the split action bar. That pattern was officially discontinued as part of the Material Design overhaul. If you want that capability, you will need to put your own Toolbar
at the bottom of your activity.
Upvotes: 1