Comic

Hi,

I am stuck for last couple of days. I am creating a comic app in both the orientation and it’s working fine on iPad but when i am building it for android and launching my app in portrait mode it’s looking scattered but when i am launching the app in landscape mode it’s working perfectly.

Can some one tell me the reason, what wrong i am doing?

 Thanks,

Hi @sabir,

Can you post what your “config.lua” and “build.settings” contents look like? Most likely it’s some little setting in one of those.

Thanks,

Brent

Thanks,

Here is my config.lua and build.setting file.

Config:

[lua]

application = 

{

    content = 

    { 

        fps = 60,

    },

    

    imageSuffix =

    {

        ["@2x"] = 2

    }

}

[/lua]

Build setting:

[lua]

settings =

        {

        orientation =

        {

        

        default = “landscape”,

        supported = 

        { 

            “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” 

        }

    },

                android =                

                {

                versionCode = “1”,

                },

                

}

[/lua]

Hi @sabir.ahmed59,

OK, I see a few things here:

  1. You need to specify a “width” and “height” parameter in your config.lua “content” table. This enables dynamic scaling (it won’t work without those, in fact). You should also choose the correct “scale” setting in that table. I recommend “letterbox” in most cases, but some people prefer “zoomEven”. I do not recommend “zoomStretch”. All of this is detailed here:

http://docs.coronalabs.com/guide/basics/configSettings/index.html

  1. In your build.settings, you set “default” to “landscape”, but it should be one of the four allowed options… either “landscapeRight” or “landscapeLeft” in your case.

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Hope this helps,

Brent

Hi Brent,

I did the changes as you mentioned but no luck…

I am still facing the same problem.

Hi @sabir.ahmed,

Please post your new config.lua and build.settings here, so I can see the changes you made.

Thanks,

Brent

Hi Brent,

Here is my config and build setting file.

config:

[lua]

application = 

{

    content = 

    { 

        fps = 60,

        width = 600,

        height = 1024, 

        scale = “letterbox”,

    },

    

    imageSuffix =

    {

        ["@2x"] = 2

    }

}

[/lua]

Build:

[lua]

settings =

        {

        orientation =

        {

        

        default = “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” ,

        supported = 

        { 

            “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” 

        }

    },

                android =                

                {

                versionCode = “1”,

                },

                

[/lua]

Thanks,

Hi @sabir.ahmed,

About all I see here is that you’re including all 4 orientation options as your “default” in addition to “supported”. Try picking just one for “default” and then leave the “supported” table containing all of them.

That being said, if this is a comic app with text bubbles to read, you might want to use just landscape orientation OR portrait orientation, but not both (and then allow the normal + 180 degrees flip on the one you think is best for your art and layout).

Brent

Hi @sabir,

Can you post what your “config.lua” and “build.settings” contents look like? Most likely it’s some little setting in one of those.

Thanks,

Brent

Thanks,

Here is my config.lua and build.setting file.

Config:

[lua]

application = 

{

    content = 

    { 

        fps = 60,

    },

    

    imageSuffix =

    {

        ["@2x"] = 2

    }

}

[/lua]

Build setting:

[lua]

settings =

        {

        orientation =

        {

        

        default = “landscape”,

        supported = 

        { 

            “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” 

        }

    },

                android =                

                {

                versionCode = “1”,

                },

                

}

[/lua]

Hi @sabir.ahmed59,

OK, I see a few things here:

  1. You need to specify a “width” and “height” parameter in your config.lua “content” table. This enables dynamic scaling (it won’t work without those, in fact). You should also choose the correct “scale” setting in that table. I recommend “letterbox” in most cases, but some people prefer “zoomEven”. I do not recommend “zoomStretch”. All of this is detailed here:

http://docs.coronalabs.com/guide/basics/configSettings/index.html

  1. In your build.settings, you set “default” to “landscape”, but it should be one of the four allowed options… either “landscapeRight” or “landscapeLeft” in your case.

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Hope this helps,

Brent

Hi Brent,

I did the changes as you mentioned but no luck…

I am still facing the same problem.

Hi @sabir.ahmed,

Please post your new config.lua and build.settings here, so I can see the changes you made.

Thanks,

Brent

Hi Brent,

Here is my config and build setting file.

config:

[lua]

application = 

{

    content = 

    { 

        fps = 60,

        width = 600,

        height = 1024, 

        scale = “letterbox”,

    },

    

    imageSuffix =

    {

        ["@2x"] = 2

    }

}

[/lua]

Build:

[lua]

settings =

        {

        orientation =

        {

        

        default = “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” ,

        supported = 

        { 

            “portrait”, “portraitUpsideDown”, “landscapeRight”, “landscapeLeft” 

        }

    },

                android =                

                {

                versionCode = “1”,

                },

                

[/lua]

Thanks,

Hi @sabir.ahmed,

About all I see here is that you’re including all 4 orientation options as your “default” in addition to “supported”. Try picking just one for “default” and then leave the “supported” table containing all of them.

That being said, if this is a comic app with text bubbles to read, you might want to use just landscape orientation OR portrait orientation, but not both (and then allow the normal + 180 degrees flip on the one you think is best for your art and layout).

Brent