I'm writing an android app and want to create an action bar as follows:
I have tried this:
my menu
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@+id/actions_saved"
android:title="@string/action_settings"
android:icon="@android:drawable/btn_star"
android:showAsAction="always" />
<!-- Settings, should always be in the overflow -->
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:showAsAction="never" />
</menu>
in my class
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_actions_menu, menu);
return super.onCreateOptionsMenu(menu);
}
Is there any way to create on all my activities beside 2 of them?
How do I force the star icon be aligned to left? Can I use a regular LinearLayout?
How do I force the settings action be in an overflow menu?