android-screen-support

Android multiple screen design

旧城冷巷雨未停 提交于 2019-11-27 06:19:29
问题 I understand there is plenty of documentation about designing for multiple screen support in Android. and I have read the Android guide here as well as a number of similar questions such as this However I'm still a little confused as to how I should implement it for my application. I plan to target the following device configurations Am I correct in thinking I will need to structure the project layouts as follows: Medium density Normal screens HVGA 320x480 (160dpi): res/layout-mdpi (320 x 480

Explain the difference between drawable, drawable-ldpi, drawable-mdpi and drawable-hdpi

蹲街弑〆低调 提交于 2019-11-26 22:58:07
问题 I have a rough idea of what each of these directories are for, but I'm not really clear on the concept and I have some specific questions. For example, what are the target DPIs for each directory? When you create an asset, should it be at that target DPI or should it be at the more normal 72dpi screen DPI? If you're targeting multiple devices, is it ever appropriate to put a PNG in drawable or should you always have multiple versions slightly tailored to the specific screens? Thanks. 回答1: As

Do I need 14 different layouts to support all Android devices?

故事扮演 提交于 2019-11-26 21:18:43
I'm really feeling confused. From the docs at developer.android.com, it seems in order to keep my images scaled correctly (aspect ratio too) across all current Android devices I need all these layouts below. Is that really what everyone is doing? Am I missing something, or should I be going about this a different way? Low density Small screens QVGA 240x320 ------------------------------------------------ layout-small-ldpi layout-small-land-ldpi Low density Normal screens WVGA400 240x400 (x432) ------------------------------------------------ layout-ldpi layout-land-ldpi Medium density Normal

Supporting multiple screen size - Android

杀马特。学长 韩版系。学妹 提交于 2019-11-26 17:53:38
I am going to develop new application in Android. This application should only work in portrait (even for tablet). Also the UI and layout design should be similar on phones and tablet. We can't change the layout design for tablet as it has huge area to use. We have to stretch all the images to match phones. We can use nine patch. But I am little bit confused of using images in multiple drawables. As per my analysis (may be wrong.. : ) ) the screens are divided into density and sizes. We can use the scaling ratio of 3:4:6:8. But this ratio is based on the density. But in my case I have to

Android: Disable application for tablet

和自甴很熟 提交于 2019-11-26 15:38:37
问题 I developed an application, Now i want to restrict the application for tablet. Means the application should not run on any tablets. For that I specify the support-screens in Androidmenifest.XML file as: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.abc.xyz" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" android:maxSdkVersion="17" /> <supports-screens android:smallScreens="true" android

Scale factor for xxhdpi android?

戏子无情 提交于 2019-11-26 14:53:48
according to http://developer.android.com/training/multiscreen/screendensities.html The following scale factors are mentioned xhdpi: 2.0 hdpi: 1.5 mdpi: 1.0 (baseline) ldpi: 0.75 I was wondering what the scale factor would be for xxhdpi? In android.util.DisplayMetrics , you can see that scaling factor is 0.00625 : /** * Scaling factor to convert a density in DPI units to the density scale. * @hide */ public static final float DENSITY_DEFAULT_SCALE = 1.0f / DENSITY_DEFAULT; Where as DENSITY_DEFAULT is 160 --> scaling factor = 1.0f / 160 = 0.00625. sizeScale = DENSITY_DEFAULT_SCALE * DENSITY_DPI

How to get appropriate images in respective android Device in Android Studio

五迷三道 提交于 2019-11-26 14:51:18
问题 I m designing the layout of Music Player, but when im renderin with virtual device Nexus 5, i m not facing any problem at all but when im rendering with Nexus 7 it is showing the same size image. Posting screenshot of my photo too. Hope to get some solution from you guys. 回答1: You have to follow this to support multiple devices : changes in screen density. 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

Creating multi-screen support app android

人盡茶涼 提交于 2019-11-26 14:23:45
问题 I am creating a app in Android that must support multiple screens. For this purpose i have read many answers and one which i like most is state that i can create different folders in res folder by following name, For small screens layout-small , For large screens layout-large , For extra large screens layout-xlarge and i have to create different layouts for different screens with same name. e.g mylayout.xml and i have to put following code in manifest.xml file <supports-screens android

Setting drawable folder to use for different resolutions

强颜欢笑 提交于 2019-11-26 14:13:33
I have 4 different sizes for each of the icons I need to use in my app. The problem is My Nexus 7 (1280 x 800) and galaxy s2 (800 x 480) seem to use the resources in drawable-hdpi. How do I force the Nexus to use resources in drawable-xhdpi and then the 10 inch tab to use drawable-xxhdpi. I have this in my manifest file <supports-screens android:resizeable="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" /> How do I force the Nexus to use resources in drawable-xhdpi and then the 10 inch tab to use

Do I need 14 different layouts to support all Android devices?

六月ゝ 毕业季﹏ 提交于 2019-11-26 07:55:10
问题 I\'m really feeling confused. From the docs at developer.android.com, it seems in order to keep my images scaled correctly (aspect ratio too) across all current Android devices I need all these layouts below. Is that really what everyone is doing? Am I missing something, or should I be going about this a different way? Low density Small screens QVGA 240x320 ------------------------------------------------ layout-small-ldpi layout-small-land-ldpi Low density Normal screens WVGA400 240x400