Android Question 2 questions on layout variant and AutoscaleAll

marcick

Well-Known Member
Licensed User
Longtime User
  1. Does it make sense , today, to design a layout based on the default variant 320x480 ?
    It is a bit tricky to fit all the views you need and, today, which device has a so small resolution ?
  2. which is the formula used by AutoscaleAll ? Because I see some custom view are not scaled properly and I suppose I have to do something in the code
 

AnandGupta

Expert
Licensed User
Longtime User
Does it make sense , today, to design a layout based on the default variant 320x480 ?
It is a bit tricky to fit all the views you need and, today, which device has a so small resolution ?
No.
I use below as base variant now.
6 inch mobile variant size 360 x 724 scale=1.
All phones me and my family and friends are at least 6 inch now.

which is the formula used by AutoscaleAll ? Because I see some custom view are not scaled properly and I suppose I have to do something in the code
I believe it just proportionately increases or decreases the size.
Custom view with "Autoscale" No in custom layout, may not resize.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
It's absurd that they aren't; imagine if televisions had different ratios, depending on the "tastes" of the producers
No problem there. All we watch are some videos (movies, news etc.) on TV and they are just one view on the layout, they even show 4:3 with black borders around.

Problem is in app we expect user to interact and have different views with different sizes and anchors.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
No problem there. All we watch are some videos (movies, news etc.) on TV and they are just one view on the layout, they even show 4:3 with black borders around.

Problem is in app we expect user to interact and have different views with different sizes and anchors.
You could do the same thing on device screens. If you find that the aspect ratio of the device is different from that of your layout, you "crop", leaving empty (colored) edges.
But WHYYY ? ? What do manufacturers gain by not standardizing the ratio just like for televisions? I think NOTHING!
 
Upvote 0
Top