size change when orientation change (While set to portrait)

282 views
Skip to first unread message

Arman

unread,
Feb 18, 2015, 7:35:43 AM2/18/15
to mitappinv...@googlegroups.com
Hi I'm having a problem with my game

when i tilt my phone (like move it from portrait to landscape) all the texts and numbers(Labels) will become smaller,but the screen is still in portrait.
all screen orientations are set to portrait in the designer page.
it does not happen at first(when i just install), It happens when i go from one screen to another(while holding my phone in different orientation) and it will stay that way.

and it does not happen when i disable the auto-rotate of my phone.
What should i do?

Thanks


SteveJG

unread,
Feb 18, 2015, 8:09:28 AM2/18/15
to mitappinv...@googlegroups.com
What should you do depends on how you want the app to respond.  The default response in AI2 is to allow the Android to decide the orientation of the screen.   Notice that in the Designer screen, if you look at Screen1 Properties (in the column on the far right)   the  default response is set to Unspecified,



you can change that to Portrait, Landscape,Sensor, User depending on how you want the app to perform.  ScreenOrientation
The requested screen orientation. Commonly used values are unspecified (-1), landscape (0), portrait (1), sensor (4), and user (2). See the Android developer docuemntation for ActivityInfo.Screen_Orientation for the complete list of possible settings.

Yes, changing orientation can significantly alter how the screen objects are displayed...that is a function of how you selected the Width/Height settings of your components .. Automatic, FillParent or used specific pixels.   Developers have to factor in whether the screen should rotate or not in their development plans and use the Automatic/FillParent appropriately after testing their app.

Regards,
Steve

Arman

unread,
Feb 18, 2015, 11:11:16 AM2/18/15
to mitappinv...@googlegroups.com
Hi steve ,
Thanks for your reply.
I guess i explained it wrongly.

What i want is to make the app stay in portrait which is working good.
What i do not want is the change of size of my labels when i rotate my phone.
(the labels go smaller)

the app has around 8 screens which all are set to portrait. 

I tried changing many things and give specific size for every single thing, but it still happens.
This does not happen on Android ice cream sandwich , but it does on my Android jelly bean phone

Thanks again!

SteveJG

unread,
Feb 18, 2015, 11:29:50 AM2/18/15
to mitappinv...@googlegroups.com
You are going to have to provide screen captures from your devices for us to understand what you are talking about.   If the screen resolution of the two devices is different, the dpi on the devices may explain the phenomenon.  without images, we can only guess.

Regards,
Steve

Message has been deleted

Arman

unread,
Feb 19, 2015, 12:07:41 PM2/19/15
to

With my jelly bean.


After i rotate my phone, Labels/Texts and numbers become smaller.







With my ICS(No change)

SteveJG

unread,
Feb 19, 2015, 2:05:40 PM2/19/15
to mitappinv...@googlegroups.com
Thanks for the images.  Here is where you can get advice to help code around the differences in screens perhaps   from Taifun's advice  http://puravidaapps.com/snippets.php#2screensize

Regards,
Steve

Arman

unread,
Feb 20, 2015, 8:42:58 AM2/20/15
to mitappinv...@googlegroups.com
Thank you so much! This is such a great help.
Reply all
Reply to author
Forward
0 new messages