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

setMenuItemIcon not working with TabGroup #123

Open
TimDorand opened this issue Sep 18, 2017 · 0 comments
Open

setMenuItemIcon not working with TabGroup #123

TimDorand opened this issue Sep 18, 2017 · 0 comments

Comments

@TimDorand
Copy link

I can't set Icons on the Action Bar when put the TabGroup window.
I works great when I remove this

<TabGroup>
    <Tab></Tab>
</TabGroup>

Here is my controller


$.files.addEventListener('open', function (e) {
  abx.backgroundColor = "#000"
  var activity = $.files.getActivity();
  if (activity) {
    console.log('settings menu initiate')
    activity.onCreateOptionsMenu = function (e) {
      var settingsItem = e.menu.add({
        itemId: 102, // don't forget to set an id here
        title: "Settings",
        showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS
      });
      settingsItem.addEventListener('click', function () {
        alert('Open settings to manage cloud accounts');
      });
      abx.setMenuItemIcon({
        menu: e.menu,
        menuItem: settingsItem,
        fontFamily: fa.fontfamily,
        icon: fa.icon("fa-ellipsis-v"),
        color: "white",
        size: 30
      });
    }
  }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant