size - How to check an Android device is HDPI screen or MDPI screen? -


i want check fetch different images internet. how that?

density = getresources().getdisplaymetrics().density;  // return 0.75 if it's ldpi // return 1.0 if it's mdpi // return 1.5 if it's hdpi // return 2.0 if it's xhdpi // return 3.0 if it's xxhdpi // return 4.0 if it's xxxhdpi 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -