Recommended aspect ratio between mobile and tablet?

What size is the text size between a mobile device and a tablet device?

There is an app for a mobile device, and I need to do the same for a tablet device. If the font size in the mobile app is 16dp, what should be in the tablet app?

There must be some multiplication factor that I can use to best determine the text size for the tablet application. Android design website is not talking about this.

PS. I know that I can customize every text by testing it on the device, but I'm looking for a recommended ratio.

EDIT

not 16dp, but 16sp. Sorry!

+8
android
source share
2 answers

In fact, developers do not need to worry about this ratio. I simply extrude the font size values ​​in res / values ​​/dimensions.xml and use sp as the unit.

<resources> <dimen name="my_font_size">16sp</dimen> ... 

Scalable pixels - this looks like a dp block, but it also scales according to the user's font size preference. It is recommended to use this block when setting font sizes, so they will be adjusted for both screen density and user preferences.


I just saw your edit: since sp already uses custom prefix and dpi, you can assign different font sizes through the resource system. And, as far as I know, for phones with tablets there is not a single magic number. Just think of many different screen sizes.
However, you can use a custom style that uses one of the defined themes for text size.

I'd like to hope that device manufacturers know what font size has good readability on their devices.

 <style name="MyTextStyle" parent="@android:style/TextAppearance.Medium"> </style> 
+6
source share

If you use dip instead of pixels, it should automatically look for both phones and tablets. Tablets are usually mdpi devices (scale factor 1).

if you are interested, you can find more information about scaling factors for screens with different densities here: http://developer.android.com/guide/practices/screens_support.html

0
source share

All Articles