Reputation: 7377
In the android document they said to use split actionbar,
<manifest ...>
<activity uiOptions="splitActionBarWhenNarrow" ... >
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity> </manifest>
this what I did , but its not displaying
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.i.www.i" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomActionBarTheme" >
<activity android:uiOptions="splitActionBarWhenNarrow"
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>
how to fix it
Upvotes: 0
Views: 62
Reputation: 1006734
The split action bar pattern was discontinued with Android 5.0's Theme.Material
and recent editions of appcompat-v7
.
You are welcome to create your own Toolbar
and place it at the bottom of your layout, as a split action bar replacement. This sample project has an appcompat-v7
version of that approach, while this sample project has a sample that uses the native API Level 21 edition of the Toolbar
.
Upvotes: 1