android-resolution

how to know which phone support which layout(hdpi , mdpi and xhpi)?

假如想象 提交于 2020-03-11 02:42:06
问题 I'm a little confused about how to determine which phones support what layout types. I've done some research but haven't found a satisfying answer. For example, I've found the below guide: xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp However, I still have some concerns: Samsung grand (480*800) and HTC wild fire S (320*480) both support MDPI. These screens have very

If I have an image 50dp wide/tall in xhdpi, what size do I make for mdpi?

て烟熏妆下的殇ゞ 提交于 2019-12-25 08:17:20
问题 I am working with a graphic designer at the moment who is trying to verify what sizes images I am currently using in my app so he can create new images in the right size for all resolution modes (designing the image at the smallest size and then scaling it for the other modes). In my app, I am emulating a device that is 720 x 1280: xhdpi , and on this device, an ImageView is set to size 50dp x 50 dp . Is it correct to say 50 dp xhdpi -> 25 dp mdpi? 100px? Or 50px? What exactly? What is the

What is the correct way to position controls in a RelativeLayout so that it displays the same

对着背影说爱祢 提交于 2019-12-25 04:53:07
问题 What is the correct way to position controls in a RelativeLayout so that it displays the same irrespective of Device Resolution.I guess this is clear enough,If we use dp values in giving margins like android:layout_marginTop="17dp" It displays at different places on mdpi,xhdpi,hdpi. Can someone give a full fledged guenine solution to it? Thanks 回答1: You should have different layouts for different screen sizes. For example for xhdpi screens you create layout-xhdpi folder and put layout.xml for

Android Apps design resolution

人盡茶涼 提交于 2019-12-23 19:45:49
问题 I'm required to design an apps for android. And after some reading, I find out android device are divided into few categories in term of resolution, like small screen normal screen large screen extra large screen but in different density. So lets say, now I need to come out a design for normal screen, what resolution that I should use for the "look & feel" of the apps UI. From the reading, I know android apps are use dp instead of px. So, is it means I have to convert few specific screen size

hdpi ldpi mdpi icon/menu resolution

送分小仙女□ 提交于 2019-12-20 11:07:05
问题 I want to set an icon for my application, and don't know the exact resolution to put in the three folders hdpi/ldpi/mdpi . Also i want to set icons to my menu options and don't know what resolution to apply. Thank you for your help. 回答1: Everything you need to know is here in the official documentation. 回答2: Launcher icons 48 × 48 (mdpi) 72 × 72 (hdpi) 96 × 96 (xhdpi) 144 × 144 (xxhdpi) 192 × 192 (xxxhdpi) 512 × 512 (Google Play store).png Action bar, Dialog & Tab icons 24 × 24 area in 32 ×

Colors Rendering Differently on Different Devices

孤街醉人 提交于 2019-12-20 04:16:33
问题 Im setting the button state like <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="#FFF"></item> <item android:state_enabled="true" android:color="#000"></item> <item android:state_focused="true" android:state_pressed="false" android:color="#ffffff" /> <item android:color="#c7c7c7" /> </selector> the problem is they are rendering differently on different devices like on Huwaei Ascend they are not that crisp but on Galaxy

How to choose an image resolution to be shown fullscreen?

半腔热情 提交于 2019-12-18 07:16:06
问题 I have an image which is actually 393 x 21 px, which I would like to set on the bottom of my View. The problem is that, even if i set the width and the height to fill_parent, my image stays very small in the middle of the screen bottom and on the left and the right I have an empty field. I can resolve this by reducing the Image width size mannualy but is ther any other solution whic could set the image in fullscreen ? Thank you. 回答1: //in your xml Image attribute as android:scaleType="fitXY"

Android: App not visible on 1920x1080 and 1280x720 resolution devices

佐手、 提交于 2019-12-13 05:12:14
问题 I have developed a game and uploaded it on Play Store. But its not visible on 1920x1080 and 1280x720 resolution mobiles. The manifest file is as follows: <!-- Mandatory Permissions --> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name

Bitmap size difference for devices with same density, inches and resolution

青春壹個敷衍的年華 提交于 2019-12-11 11:29:17
问题 I have two tablet devices: 1) Asus Memo Pad 172V tablet Specs given online as: 600 * 1024 pixels, 7.0 inches (~170 ppi pixel density) LINK Specs through code: 1024 * 552 pixels, 7.0 inches (160 ppi pixel density) 2) MID 7510 tablet Specs given online as: 800 * 480 pixels, 7.0 inches (no density mentioned anywhere) LINK Specs through code: 1024 * 552 pixels, 7.0 inches (160 ppi pixel density) My problem is: - Both the tablets have the same density and resolutions (by code), so how can I

Get drawable for different screen density at runtime

旧城冷巷雨未停 提交于 2019-12-11 08:57:03
问题 I want to print sizes of all drawables at run-time. So if I am on hdpi device then I can print the size of hdpi drawables but how to get access to, lets say mdpi and xhdpi as well? I can get access to all drawables resource ids with following code: final Class<R.drawable> c = R.drawable.class; final Field[] fields = c.getDeclaredFields(); for (int i = 0, max = fields.length; i < max; i++) { final int resourceId; try { resourceId = fields[i].getInt(drawableResources); } catch (Exception e) {