1. #1
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    17
    Vote Rating
    0
    dholth is on a distinguished road

      0  

    Default Orientation change in ChildBrowser doesn't repaint app

    Orientation change in ChildBrowser doesn't repaint app


    I'm using PhoneGap's ChildBrowser plugin and Touch 1.x to open a .pdf on iPad without really leaving my app. When the user changes orientation and presses 'done', returning to the app, the app does not repaint itself.

    How do I convince the app to repaint itself with its new size? Can I just send a simulated 'orientationchange' event? Ext.repaint(); and Panel.doLayout(); have not worked.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    850
    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


    Does the orientation events fire?
    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
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    17
    Vote Rating
    0
    dholth is on a distinguished road

      0  

    Default


    The orientation event does not fire. I solved the problem by setting
    Code:
    window.plugins.childBrowser.onClose = function() { 
    viewport.setSize(window.innerWidth, window.innerHeight); 
    };
    (this function is called when the user returns from the child browser).
    Last edited by dholth; 13 Dec 2011 at 8:34 AM. Reason: fromat

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    17
    Vote Rating
    0
    dholth is on a distinguished road

      0  

    Default


    I may have spoke too soon. Sometimes this works, sometimes it doesn't.

Thread Participants: 1