Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Windows or Views Navigation

Hi

Developing a app which has a set of buttons in the header that will act as the main navigation.

The way it works now is: app.js opens a new main window that is fullscreen, I then add views for the header logo and buttons.

When you click the first button I open a new window underneath the header.

I now want to be able to click another button on the bar to close the win.

Here is the code: http://pastie.org/1284625

I will eventually set the current window to a global variable so that no matter which button is clicked the current win/view will be known.

Should I be using a view instead?

— asked November 9th 2010 by Kevin
  • android
  • view
  • window
4 Comments
  • Just thought of something, Should I have my main nav as an external file and then everytime I create a window add the nav to it?

    — commented November 9th 2010 by Kevin
  • Kevin

    Note that using fullscreen is bad practice in most cases, because it hides the default status bar. Unnecessarily hiding it may get your app marked down in reviews, and possibly rejected from the marketplace(s).

    — commented November 10th 2010 by Paul Dowsett
  • By status bar, I mean this. Try using navBarHidden: true instead

    — commented November 10th 2010 by Paul Dowsett
  • Thanks for the replies Hal.

    Just to get this question to its conclusion:

    1. I should be using windows.
    2. I should have a 'close' event on all windows that closes them and have this event on any "back" buttons I put in myself.

    I'm using fullscreen as the target device will be a tablet and It will be a multimedia presentation so screen real estate is important for me. Possibly a later version will keep the status bar for phone users.

    — commented November 11th 2010 by Kevin

1 Answer

  • Accepted Answer

    "Just thought of something, Should I have my main nav as an external file and then everytime I create a window add the nav to it?"

    This is what I would do, Kevin. Use Ti.include() to achieve it.

    — answered November 10th 2010 by Paul Dowsett
    permalink
    2 Comments
    • Sorry for double comment. I added it to the wrong reply.

      Thanks for the replies Hal.

      Just to get this question to its conclusion: 1. I should be using windows. 2. I should have a 'close' event on all windows that closes them and have this event on any "back" buttons I put in myself.

      I'm using fullscreen as the target device will be a tablet and It will be a multimedia presentation so screen real estate is important for me. Possibly a later version will keep the status bar for phone users.

      — commented November 11th 2010 by Kevin
    • OK, if this answer has been helpful, then you should close the question. Alternatively, if you still need some help (staying on the topic set in the question) then post your latest code so that someone can suggest something.

      Cheers

      — commented November 11th 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.