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

feat(android): parity for optionbar index #13324

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Mar 23, 2022

fixes #13323

Adds parity for setting the optionBar.index to -1 to deselect everything.

example

const win = Ti.UI.createWindow();
const optionBar = Ti.UI.createOptionBar({
  labels: [ 'Option 1', 'Option 2', 'Option 3' ]
});
const btn = Ti.UI.createButton({
  title:"reset", bottom: 10
})
optionBar.addEventListener('click', (e) => {
  Ti.API.info(`Option ${e.index} was selected.`);
});
btn.addEventListener('click', (e) => {
  optionBar.index = -1;
});
win.add([optionBar,btn]);

win.open();

@m1ga m1ga mentioned this pull request Mar 23, 2022
1 task
Copy link
Contributor

@caspahouzer caspahouzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good. Do we need another reviewer?

@caspahouzer
Copy link
Contributor

Bildschirmaufnahme.2022-03-23.um.16.41.53.mov

@hansemannn hansemannn merged commit af7371b into tidev:master Mar 25, 2022
@caspahouzer
Copy link
Contributor

❤️

@m1ga m1ga deleted the optionBarParity branch May 23, 2022 12:03
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

Successfully merging this pull request may close these issues.

Android: OptionBar parity
3 participants