Appcelerator Titanium Facebook Like Menu -


at moment i'm developing app want use facebook menü here:

https://github.com/mpociot/titanium-facebook-slide-menu

// alphabytes  // facebook menu window var leftmenu    = ti.ui.createwindow({     backgroundcolor: 'red',     top:   0,     left:  0,     width: 150,     zindex: 1 }); var data = [{title:"row 1"},{title:"row 2"},{title:"row 3"},{title:"row 4"}]; var tableview   = ti.ui.createtableview({ data: data }); leftmenu.add(tableview); leftmenu.open();  // facebook menu window var rightmenu   = ti.ui.createwindow({     backgroundcolor: 'red',     top:   0,     right:  0,     width: 150,     zindex: 1 }); var data = [{title:"row 1"},{title:"row 2"},{title:"row 3"},{title:"row 4"}]; var tableview   = ti.ui.createtableview({ data: data }); rightmenu.add(tableview); rightmenu.open();  // animations var animateleft = ti.ui.createanimation({     left: 150,     curve: ti.ui.ios.animation_curve_ease_out,     duration: 500 }); var animateright    = ti.ui.createanimation({     left: 0,     curve: ti.ui.ios.animation_curve_ease_out,     duration: 500 }); var animatenegativeleft = ti.ui.createanimation({                 left: -150,                 curve: ti.ui.ios.animation_curve_ease_out,                 duration: 500 });   var win = titanium.ui.createwindow({     left: 0,     zindex: 10 }); var win1 = titanium.ui.createwindow({     backgroundcolor: 'white',     title: 'facebook menu',     left: 0,     zindex: 10 }); var nav = titanium.ui.iphone.createnavigationgroup({    window: win1,    left: 0,    width: ti.platform.displaycaps.platformwidth }); var button = ti.ui.createbutton({     title: 'm',     left: 10,     width: 30,     height: 30,     top: 10 }); var button2 = ti.ui.createbutton({     title: 'm',     right: 10,     width: 30,     height: 30,     top: 10 }); var touchstartx = 0; var touchstarted = false; win1.addeventlistener('touchstart',function(e){     touchstartx = parseint(e.x,10); }); win1.addeventlistener('touchend',function(e){     touchstarted = false;     if( win.left < 0 ){         if( win.left <= -140 ){             win.animate(animatenegativeleft);             istoggled = true;         } else {             win.animate(animateright);             istoggled = false;         }     } else {         if( win.left >= 140 ){             win.animate(animateleft);             istoggled = true;         } else {             win.animate(animateright);             istoggled = false;         }     } }); win1.addeventlistener('touchmove',function(e){     var x       = parseint(e.globalpoint.x, 10);     var newleft = x - touchstartx;     if( touchstarted ){         if( newleft <= 150 && newleft >= -150)         win.left    = newleft;     }     // minimum movement 30     if( newleft > 30 || newleft < -30 ){         touchstarted = true;     } }); nav.add(button); nav.add(button2); win.add(nav); win.open();   var istoggled = false; button.addeventlistener('click',function(e){     if( !istoggled ){         win.animate(animateleft);         istoggled = true;     } else {         win.animate(animateright);         istoggled = false;     } });  button2.addeventlistener('click',function(e){     if( !istoggled ){         win.animate(animatenegativeleft);         istoggled = true;     } else {         win.animate(animateright);         istoggled = false;     } }); 

i have implemented menu , works expected.

now problem following: if click in leftmenu on e.g. "row 1" ("settings" me), want have settings menu shown in main window. how that?

if create new window , open it, complete new window without facebook menu on left , buttons... don't know how do?!?! can help?

thanks, sascha

i hope did't misunderstand question, open new windows views inside of main window. here's code: https://gist.github.com/manumaticx/4961175

or want change menu? same left menu window!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -