Sunday, 15 May 2011

android - why the split action bar not show? -



android - why the split action bar not show? -

my minsdkversion 8 , targetsdkversion 21

the manifest `

<application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:uioptions="splitactionbarwhennarrow" android:name="com.example.coco.myapplication.mainactivity" android:label="@string/app_name" > <meta-data android:name="android.support.ui_options" android:value="splitactionbarwhennarrow" /> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application>

`

the menu

<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".mainactivity"> <item android:id="@+id/action_settings" android:title="@string/action_settings" android:orderincategory="100" app:showasaction="never" /> <item android:id="@+id/test1" android:title="test1" android:icon="@drawable/ic_launcher" app:showasaction="ifroom|withtext" />

in preview of android studio see item on bottom, when run on either emulator or device on top,i have create new project test doesn't work, how solve it?thanks

plus: don't know attribute "whennarrow" mean ,is mean device size narrow or space action buttons narrow?if first,how should justice whether device narrow or wide,if second,how many items lead action bar split?

android android-actionbar

No comments:

Post a Comment