title: titanium navigationGroup for both ios and android
body: <p>i am currently working on the code below and the code below is an ios navigationGroup in titanium. I am trying to make it or both ios and android but it seems complicated. How can i make it for both ios and android.    </p>
  
  <pre><code> var win1 = Titanium.UI.createWindow();
  
  
  
          var win2 = Titanium.UI.createWindow({
  
              backgroundColor: 'white',
  
              barColor: '#336699'
  
          });
  
  
  
          var win3 = Titanium.UI.createWindow({
  
              backgroundColor: 'white',
  
              barColor: '#336699',
  
              title: 'Register'
  
          });
  
  
  
          var win4 = Titanium.UI.createWindow({
  
              backgroundColor: 'white',
  
              barColor: '#336699',
  
              title: 'Sign in'
  
          });
  
  
  
  
  
          //create view1
  
          var view1 = Titanium.UI.createView();
  
  
  
          //create label1
  
          var label1 = Titanium.UI.createLabel({
  
          text: 'Welcome',
  
          height: 40,
  
          width: 250,
  
          top: 100,
  
          color: '#336699'
  
          });
  
  
  
  
  
          //create button1
  
          var button1 = Titanium.UI.createButton({
  
              title: 'Register',
  
              height: 35,
  
              width: 100,
  
              top: 210
  
          });
  
  
  
          button1.addEventListener('click', function(){
  
              nav.open(win3);
  
          });
  
  
  
          var nav = Titanium.UI.iPhone.createNavigationGroup({
  
             window: win2
  
          });
  
  
  
  
  
          //create view2
  
          var view2 = Titanium.UI.createView();
  
  
  
          //create label2
  
          var label2 = Titanium.UI.createLabel({
  
  
          height: 45,
  
          width: 200,
  
          top: 145,
  
          color: '#336699'
  
          });
  
  
  
  
  
          //create button2
  
          var button2 = Titanium.UI.createButton({
  
              title: 'Sign in',
  
              height: 35,
  
              width: 100,
  
              top: 250
  
          });
  
  
  
          button2.addEventListener('click', function(){
  
              nav.open(win4, {animated:true});
  
          });
  
  
  
          var nav = Titanium.UI.iPhone.createNavigationGroup({
  
             window: win2
  
          });
  
  
  
  
  
  
  
          view2.add(button1);
  
          view1.add(label1);
  
          win2.add(view1);
  
  
  
          view2.add(button2);
  
          view2.add(label2);
  
          win2.add(view2);
  
  
  
          win1.add(nav);
  
          win1.open();
  </code></pre>