android - Measuring & Scaling Drawable Assets for Multiple Densities -
i have xxhdpi xml file need downscale xhdpi , mhdpi.
the dp sizes in xxhdpi file perfect, have xhdpi , mhdpi devices displaying inaccurately.
i understand sizing bitmap/png graphics. not problem.
my problem trying scale elements within ui (picture questions , answers background fills and/or font sizes). i'm beingness advised go , remeasure each element in photoshop? cannot right, certainly can apply mathematical formula problem?
also how can business relationship unusual sizes of todays xhdpi marketplace?
for example:
xxhdpi: < dimen name="standard_button_height">40dp< dimen >
xhdpi: < dimen name="standard_button_height">?dp< dimen >
if understand correctly want app identically scaled across devices (meaning don't wish take advantage of space on tablets , instead blow proportional across board). if that's not correct, please elaborate further.
however, solve above problem...
what need focus on not xxhdpi vs. xhdpi here rather dp of target device. vast bulk of android devices fall 2 classes. ~360x640dp , ~800x1280dp (when held in portrait). latter xlarge class (tablets).
so, you'll want create directory called res/values-xlarge , in folder you'll have dimens.xml in you'll scale dp widths 2.22 (800/360) , dp heights 2 (1280/640). 40dp tall button need 80dp.
this not perfect gambit because devices utilize of screen real estate non hardware keys (while others have hardware keys , give entire screen utilize).
android android-layout android-fragments android-drawable
No comments:
Post a Comment