title: Appcelerator Titanium Facebook Like Menu
body: <p>at that moment i'm developing an App where i want to use the Facebook Like Menü from here:</p>
  
  <p><a href="https://github.com/mpociot/titanium-facebook-slide-menu" rel="nofollow">https://github.com/mpociot/titanium-facebook-slide-menu</a></p>
  
  <pre><code>// ALPHABYTES
  
  // Facebook like 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 like 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 &lt; 0 ){
          if( win.left &lt;= -140 ){
              win.animate(animateNegativeLeft);
              isToggled = true;
          } else {
              win.animate(animateRight);
              isToggled = false;
          }
      } else {
          if( win.left &gt;= 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 &lt;= 150 &amp;&amp; newLeft &gt;= -150)
          win.left    = newLeft;
      }
      // Minimum movement is 30
      if( newLeft &gt; 30 || newLeft &lt; -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;
      }
  });
  </code></pre>
  
  <p>I have also implemented the menu and everything works as expected.</p>
  
  <p>Now my Problem is the following:
  If i click in the leftMenu on e.g. "Row 1" ("Settings" with me), i want to have my Settings Menu shown in the Main Window. <strong>How to do that?</strong></p>
  
  <p>If i create a new Window and open it, i get a complete new window without the facebook menu on the left and the buttons... I don't know how to do?!?! Can someone help?</p>
  
  <p>Thanks,
  Sascha</p>