Android Question Any Tips on which variant to use when using Designer

doogal

Member
Licensed User
Longtime User
Hi all,
When starting an app I usually use the 320X480 scale. I'm sure no one has a device this small anymore, so I was wondering if anyone had any tips on which variant I should be using. I have seen the autoscale examples from Klaus and that has helped some, but if I can use a larger starting point that would be great.

Thank you,
Douglas
 

canalrun

Well-Known Member
Licensed User
Longtime User
I do something very similar. I create one variant 320X480 with a scale of 1. Then I do something which is probably comparable to Klaus' autoscale. I create a subroutine called from activity_create or activity_resume named InitDisplay. In this I dynamically reposition everything. Scaling (1.5, 2, ...) automatically resizes controls such as EditText, Labels, etc to an equivalent size on the new device. I usually want to dynamically resize ImageViews and Panels.

Using InitDisplay let's me iteratively reposition things on the display. I make an initial guess, sometimes things don't fit, I resize something (usually an image) and try again.

I have found some devices, like my Nexus 5, have really strange screen dimensions. My layouts look good even on these weird devices. I developed this method before the Designer Scripts and Anchors – so maybe those replace what I'm doing.

Barry.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…