Author Topic: Help with screen size  (Read 3529 times)

MobileGuy

  • Newbie
  • *
  • Posts: 5
Help with screen size
« on: August 15, 2011, 07:18:30 AM »
My app works fine on my Hero phone but when I try it on an emulator with a 800x600 screen it stays stuck in the upper left hand corner. Is there any way to scale it or get it to fit in the center of the screen. An example with some code would help as I can't find any. My hero has a 320x480 screen.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Help with screen size
« Reply #1 on: August 15, 2011, 11:13:40 AM »
My app works fine on my Hero phone but when I try it on an emulator with a 800x600 screen it stays stuck in the upper left hand corner. Is there any way to scale it or get it to fit in the center of the screen. An example with some code would help as I can't find any. My hero has a 320x480 screen.

You don't need any code because inside HAC you can specify how your app should appear in different screen sizes. There is a section on this in the Help pdf and HAC built-in Help.

The default behavior is for the app display to stay in the top left corner unscaled. However, most apps should probably use the To Fit option which centrally scales the app to fit the screen. To specify this use the menu Android, sub menu Your Application and under the Scale section select your option.
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

MobileGuy

  • Newbie
  • *
  • Posts: 5
Re: Help with screen size
« Reply #2 on: August 16, 2011, 10:33:44 AM »
Thank you that has solved it. Perhaps the To Fit option should be default.

kaboekieman

  • Jr. Member
  • **
  • Posts: 55
Re: Help with screen size
« Reply #3 on: August 29, 2011, 08:36:01 PM »
Does HAC also have the option to use percentages, instead of pixels? So the homescreen would be 100 percent width and 100 percent heigh. Or perhaps use dp instead of pixels? this way the layout will be the same no mather what device the app is run on.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 287
Re: Help with screen size
« Reply #4 on: August 30, 2011, 06:36:49 AM »
Does HAC also have the option to use percentages, instead of pixels? So the homescreen would be 100 percent width and 100 percent heigh. Or perhaps use dp instead of pixels? this way the layout will be the same no mather what device the app is run on.

HAC doesn't have the option to use percentages but we have followed a similar reasoning to yours.

At one time smart phones generally had the same aspect ratio and screen size, 320x480 but things are quite different now especially with tablets and widescreen formats. If one app build has to run on any device then the options we thought of are below. If the app designer wanted to have an app for each specific device then option (1) below would be best. However we think most users wouldn't want to go this route and would just want their app to automatically run on any device which is where option (2) comes in. 

We give the the following options to HAC apps:-
(1) Unscaled - the app maps its pixels directly to that of the device.
(2) To Fit - the app scales itself proportionally to fit the device's screen size which is nearest your DP suggestion.
(3) Stretch - the app stretches to fully fill the device's screen.

I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything