How to make applications support small screens?

IamBot

Member
Licensed User
Longtime User
I just tried my application on a friends phone which screen is a lot smaller than mine Galaxy S2. About 25% of the layout content won't even display.

Is there an easy way to fix this? I've mostly used the Abstract Designer to put out content etc.

EDIT: Besides the content from the Abstract Designer, I've used dip only.
 
Last edited:

mc73

Well-Known Member
Licensed User
Longtime User
I think you should use the designer's scripts for this, check Erel's tutorial.
On the other hand, I personally recreate the layout to fit the small screen. Very recently I created an app which is intended to run on Galaxy Fit. I chose the 'hard' way of manually resizing everything in a new layout. Why? Because, to me, it was not just a matter of resizing, but rearranging the elements, in order to have a better look.
 
Upvote 0

IamBot

Member
Licensed User
Longtime User
I think you should use the designer's scripts for this, check Erel's tutorial.
On the other hand, I personally recreate the layout to fit the small screen. Very recently I created an app which is intended to run on Galaxy Fit. I chose the 'hard' way of manually resizing everything in a new layout. Why? Because, to me, it was not just a matter of resizing, but rearranging the elements, in order to have a better look.

I just tried to use designer scripts and based everything on 'dip'. But this doesn't seem to help since different screens have different 'dips'? It looks exactly the same on the small screen. Maybe I need to base everything on x/y%?
 
Upvote 0

IamBot

Member
Licensed User
Longtime User
'dip' helps you target devices with different scales, not different physical size.

You should use a scaling method as suggested in the multiple screens tutorial to make your layout fit smaller devices.

What if I use the Designer Scripts and base my layout views' left/top/width/height and textsize on x/y%?

Would this scale properly with other devices?
 
Upvote 0

Penko

Active Member
Licensed User
Longtime User
It would scale properly on the same physical size or larger devices but not smaller. That's why you have the designer, to see how it looks like on difference resolutions and sizes. Additionally, you have the EMULATOR which you can adjust to different devices and see how your application works everywhere.

I didn't understand if you have problems in vertical or horizontal direction. If vertical, consider putting scrollview where possible. That always solves my vertical problems. As for horizontal, just optimize the design for the smallest screen you will support.

Then, go to the page @mc73 sent you(Erel's tutorial) and apply the scaling technique shown there. I am intensively using it in my application and can ensure you, it scales properly both on my Android 2.2 HTC Desire(about 4 inch device) and my Next tablet(7 inch). On the Tablet, texts are having the same physical dimension compared to the whole Activity sizes.
 
Upvote 0
Top