Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icons do not appear #113

Open
necrocyber opened this issue Nov 16, 2016 · 3 comments
Open

Icons do not appear #113

necrocyber opened this issue Nov 16, 2016 · 3 comments
Labels

Comments

@necrocyber
Copy link

necrocyber commented Nov 16, 2016

The icons in the action bar, do not appear in certain occasions, what is the problem to this?

actividad.onCreateOptionsMenu = function(e) {
  e.menu.clear();
				
  var settingsItem = e.menu.add({
    itemId: 101, // don't forget to set an id here
    title: "Settings",
    showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS
  });
	              
  settingsItem.addEventListener('click', function(){
    alert('Settings clicked');
  });
	
  abx.setMenuItemIcon({
    menu: e.menu,
    menuItem: settingsItem,
    fontFamily: fa.fontfamily,
    icon: fa.icon("fa-gear"),
    color: "#fff",
    size: 30
  });
};
@manumaticx
Copy link
Collaborator

I can not see an error in the above code. This seems to be our example code. So it should work.

Are you sure, onCreateOptionsMenu gets called?

@chmiiller
Copy link

I'm having the same. The onCreateOptionsMenu is not being called, don't know why =/

@manumaticx
Copy link
Collaborator

Referring to the example project, calling win.activity.invalidateOptionsMenu(); triggers the system to call onCreateOptionsMenu again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants