0

I have looked for a solution to the problem on Stack Overflow and google, but nothing seems to help. To clarify, I am talking about the one with the id "favourite"

Here is my menu xml:

<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="com.rasmase.smbcbrowser.MainActivity" >



<item android:id="@+id/favourite"
      android:icon="@drawable/ic_favourite"
      android:title="@string/favourite"
      app:showAsAction="ifRoom" />

<item
    android:id="@+id/go_to_comic"
    android:orderInCategory="100"
    android:title="@string/Go_to_comic"
    app:showAsAction="never"/>

And my onCreateOptionsMenu:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu items for use in the action bar
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.main, menu);
    return super.onCreateOptionsMenu(menu);
}

Anyone else have any idea what is wrong?

EDIT: Turns out that I am retarded. The Icon was a black star on a black actionbar. Image for reference: https://i.stack.imgur.com/tVWm7.png

7
  • And you are using AppCompat and your activity extends from `ActionBarActivity'? Jun 3, 2014 at 17:17
  • @ianhanniballake My activity is extending from ActionBarActivity. I am also using AppCompat v7.5
    – Rasmase
    Jun 3, 2014 at 17:21
  • app:showAsAction="never" .. you have it set to never show
    – dymmeh
    Jun 3, 2014 at 17:24
  • @dymmeh To clarify, I am talking about the one with the id favourite.
    – Rasmase
    Jun 3, 2014 at 17:25
  • @Rasmase - Roger that. Did you try cleaning your project and rebuilding it? Code and XML all look fine
    – dymmeh
    Jun 3, 2014 at 17:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.