Hello everybody,

what is the best way for controlling the size of widget on Android?

Look on following table:

• On 3.6-4.0 inch screen (smartphone) with 480x800px the dpi is about
240dpi
• On 4.3 inch screen (smartphone) with 540x960px the dpi is about
270dpi
• On 7 inch screen (tablet) with 480x800px the dpi is about 130dpi
• On 7 inch screen (tablet) with 600x1024px the dpi is about 170dpi
• On 8.9 inch screen (tablet) with 1280x800/768px the dpi is about
170dpi
• On 10.1 inch screen (tablet) with 1280x800px the dpi is about 150dpi

So in general smartphones comes with much higher dpi.

Now if I create a control with 100px width it will be good on low dpi
displays but bad on high, where the control will be too small. If I
create the same control with 100dp it will be opposite – on high
resolution displays it will scale to e.g. 150 px, but on low dpi
screens (tablets) it will be still 100px or smaller is the density
falls below 160dpi.

So how I should make a control that on 4inch display occupy 1inch on
7inch display occupy 1.5inch and on the 10.1inch display occupy
1inches? In other words – bigger screen size, the bigger is the
control, but without considering the resolution.

But is that in fact a good approach?

Regards,
SteN

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to