1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    24
    Vote Rating
    0
    deepaknair.g is on a distinguished road

      0  

    Default BLOCKING PORTRAIT VIEW

    BLOCKING PORTRAIT VIEW


    Hi all,
    I want my application to run only in LANDSCAPE view.How can I block the portrait view?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I don't believe you can do this. I could be 100% wrong
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Quote Originally Posted by deepaknair.g View Post
    Hi all,
    I want my application to run only in LANDSCAPE view.How can I block the portrait view?
    Is your app running on the www or did you wrap it inside a native app?
    If you wrap it inside a native app you can easily achieve that.

    However, you could use a simple trick on web apps:
    You should monitoring the browser orientation change and when it has been detected, you should just get the page body and rotate it back to its original position using the css rule "-webkit-transform".
    For istance:

    Code:
    -webkit-transform: rotate(90)
    I'm not sure if it works because I've never tried but it could be a (not elegant) solution.

    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/