Android 安卓操作按钮被推入溢出状态
我遵循android开发者指南。我在操作栏中打开了这个菜单: res/menu/main_activity_actions.xmlAndroid 安卓操作按钮被推入溢出状态,android,android-actionbar,Android,Android Actionbar,我遵循android开发者指南。我在操作栏中打开了这个菜单: res/menu/main_activity_actions.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <!--Search, should appear as action button --> <i
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<!--Search, should appear as action button -->
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="always" />
<!-- Settings, should always be in overflow -->
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:showAsAction="never"/>
</menu>
我面临的问题是,搜索
操作被推入溢出,我不知道如何使其成为始终显示在操作栏中的操作按钮
虽然有许多相关问题,但我没有发现重复的问题。
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main_activity_actions, menu);
return true;
}