Im using a custom actionbar theme (really just changed color) and disabling home icon (in main activity). I have 2 menu items that I want inflated and 'always' on the action bar. When i run the app they are both pushed into overflow.
I referred to this post here and went the route of using a custom namespace because Support v7 and still the same results. I was wondering if me using a custom actionbar theme is having anything to do with it?
here is my main_activity_actions.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:Velo="http://schemas.android.com/apk/res-auto">
<item android:id="@+id/add_ride"
android:title="@string/add_ride"
android:icon="@drawable/ic_action_new"
Velo:showAsAction="ifRoom"
/>
<item android:id="@+id/action_settings"
android:title="Settings"
android:icon="@drawable/ic_action_overflow"
Velo:showAsAction="ifRoom" />
</menu>
and here is the usual boilerplate inflater
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main_activity_actions, menu);
return super.onCreateOptionsMenu(menu);
}
not sure if u guys wanna see anything else, but let me know.
Thanks in advance
EDIT : It's weird. I can use android:showAsAction="ifRoom"
and get an error on it (red line underneath) and just ignore it and run and it works how I want, but if I use the namespace appname:showAsAction="ifRoom"
it wont work. I mean I would like to do it the proper way, but whats the harm in ignoring this error?