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

fix(android): drawer events for rightView #13619

Merged
merged 3 commits into from Oct 28, 2022
Merged

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Oct 26, 2022

Currently the drawer events are not connected when you don't use a leftView.

Test:

const drawerWindow = Ti.UI.createWindow();
const centerView = Ti.UI.createView();
const menuView = Ti.UI.createView({backgroundColor:"red"});
const btn = Ti.UI.createButton({title:"open"});
centerView.add(btn);
btn.addEventListener("click", function(e){ drawer.toggleRight() });

const drawer = Ti.UI.Android.createDrawerLayout({
	centerView: centerView,
	rightView: menuView,
});

drawerWindow.add(drawer);
drawerWindow.open();

drawer.addEventListener("close", function(e) {
	Ti.API.info("drawer close");
});
drawer.addEventListener("open", function(e) {
	Ti.API.info("drawer open");
});
drawer.addEventListener("slide", function(e) {
	Ti.API.info("drawer slide");
});
drawer.addEventListener("change", function(e) {
	Ti.API.info("drawer change");
});

Ti 11.1.1: no events are shown in the logs
with this PR: events are shown.

@dieskim
Copy link
Contributor

dieskim commented Oct 26, 2022

Thanks for adding this fix

@hansemannn hansemannn merged commit b837cc2 into master Oct 28, 2022
@m1ga m1ga deleted the 221026_android_drawer branch December 10, 2022 17:49
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.

None yet

3 participants