Skip to content

setResizeCallback not working build android app #3348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LokeshPatel opened this issue Jul 22, 2016 · 0 comments
Open

setResizeCallback not working build android app #3348

LokeshPatel opened this issue Jul 22, 2016 · 0 comments

Comments

@LokeshPatel
Copy link

LokeshPatel commented Jul 22, 2016

Hi,

setResizeCallback method not fire after rotation in android device. When run in browser the working fine.
buth create apk with cross platform then event not call.
Bellow code , I have used.

cc.view.resizeWithBrowserSize(true);
    cc.view.setResizeCallback(function() {
    // Do things according to your need,
    // e.g. change a resolution policy when user's mobile orientation changed.
        var frameSize = cc.view.getFrameSize();
        if(frameSize.width < frameSize.height)
        {
            cc. view. setDesignResolutionSize(frameSize.width,frameSize.height, cc.ResolutionPolicy.EXACT_FIT);
        }
        else
        {
            cc.view.setDesignResolutionSize(frameSize.height,frameSize.width, cc.ResolutionPolicy.EXACT_FIT);
        }
    });

Please Help me how to solve issue .

Thanks,
Lokesh Patel

@LokeshPatel LokeshPatel changed the title setResizeCallback Working build android app setResizeCallback not working build android app Jul 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant