Closed fabiomlferreira closed 9 years ago
You could use NappDrawer, but the correct way would be like this: https://github.com/manumaticx/Ti.DrawerLayout-Demo-Alloy-App/blob/master/README.md
If you're also targeting iOS, you might want to consider this widget: https://github.com/FokkeZB/nl.fokkezb.drawer/blob/master/README.md
Hi @invaderhd
you could do something like this
var abx = require('com.alcoapps.actionbarextras');
var NappDrawerModule = require('dk.napp.drawer');
var win = NappDrawerModule.createDrawer({
// ...
});
win.addEventListener('open',function(e){
var activity = win.getActivity();
if (activity){
var actionbar = activity.actionBar;
actionbar.displayHomeAsUp = true;
actionbar.onHomeIconItemSelected = function(){ mainWindow.toggleLeftWindow(); };
abx.setHomeAsUpIcon("/images/menu.png");
}
});
@ricardoalcocer I'm using nl.fokkezb.drawer, when I start this project I choose the nl.fokkezb.drawer because I'm target android and iOS and I thought that will be simple to use the same module for both platforms.
@manumaticx with your code I get the icon but the onHomeIconItemSelected is never fired. I already have done this but don't manage any solution to fire a function when the home icon is tapped. Did you have other idea?
@invaderhd onHomeIconItemSelected
works for me. Just tested with 4.1.0.GA and the above code
@invaderhd I hope you met your deadline ;) Can we close this issue?
I don't manage put it to work but I use the sdk 3.5.1 to send the first version of the app then I will remake somethings and try to fix the issue
I need to finish my app til 31 of August, and at the moment my only problem is that I can't create a menu icon that opened my drawer.
I have an image (menu.png) and I want to put it no the actionbar on the left side. Like in your image.
How can I do it to integrate with viezel/NappDrawer? Please I only need a quick example. Please @ricardoalcocer I really appreciate your help...