android-resolution

Android: what is the difference between resolution and density?

五迷三道 提交于 2019-11-30 06:57:10
问题 according to Android definitions, i've found that: Resolution: The total number of physical pixels on a screen Density: Based on the screen resolution, the spread of pixels across the physical width and height of the screen. Can anyone help me to understand better the differences between the two definitions? Thanks in advance c. 回答1: Resolution is about how many pixels you can show on screen. Density is based on your device real size, if it's small and has a higher resolution, than the

How to set layout on 7" two different tablet?

独自空忆成欢 提交于 2019-11-29 15:16:28
问题 I have two 7 inch tablet one tablet (800*480) and second tablet (1024*600). I have facing problem following :- 1. Both can run on layout-mdpi and layout-large so how can i make different folder for run my app both resolution. Application run xml for mdpi layout in both tablet:- layout-mdpi layout-hdpi Application run xml for large layout in both tablet:- layout-large layout-xlarge I can implement http://developer.android.com/guide/practices/screens_support.html this but not use full to me. or

How to choose an image resolution to be shown fullscreen?

独自空忆成欢 提交于 2019-11-29 12:50:32
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. //in your xml Image attribute as android:scaleType="fitXY" or //using thru programatically imgview.setScaleType(ScaleType.FIT_XY); 来源: https://stackoverflow.com

Android: what is the difference between resolution and density?

随声附和 提交于 2019-11-28 23:10:59
according to Android definitions, i've found that: Resolution: The total number of physical pixels on a screen Density: Based on the screen resolution, the spread of pixels across the physical width and height of the screen. Can anyone help me to understand better the differences between the two definitions? Thanks in advance c. Resolution is about how many pixels you can show on screen. Density is based on your device real size, if it's small and has a higher resolution, than the density is high cause you show more pixels in less physical space. Resolution is a measure of how many pixels a

Android responsive layout

杀马特。学长 韩版系。学妹 提交于 2019-11-28 10:57:21
I am building application (calculator). I use table layout with buttons inside. It looks perfect on screen of Samsung Galaxy II, however it looks very bad on bigger screens. The buttons hight is very small. How I can stretch the buttons on bigger screens? The layout XML is bellow: <ScrollView xmlns:android="http://schemas.an xmlns:tools="http://schemas.android.com/ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="right" android:paddingBottom="@dimen/activity_v android:paddingLeft="@dimen/activity_hor android:paddingRight="@dimen/activity_ho android

Folder name for 7\" hdpi tablet Android

你说的曾经没有我的故事 提交于 2019-11-27 09:39:19
I have Tablet with 7" screen (600×1024) with hdpi (240 dpi classification). I have created folder layout-sw600dp . But it's not working in this resolution tablet. Its working fine with 7" screen (600×1024) with mdpi (160 dpi classification). Which folder should I create for 7" (600×1024) tablet which has hdpi (240 dpi classification)? It depends from the Android API version you're building against, like mentioned here : ... However, this won't work well on pre-3.2 devices, because they don't recognize sw600dp as a size qualifier, so you still have to use the large qualifier as well. So, you

Android responsive layout

随声附和 提交于 2019-11-27 03:53:09
问题 I am building application (calculator). I use table layout with buttons inside. It looks perfect on screen of Samsung Galaxy II, however it looks very bad on bigger screens. The buttons hight is very small. How I can stretch the buttons on bigger screens? The layout XML is bellow: <ScrollView xmlns:android="http://schemas.an xmlns:tools="http://schemas.android.com/ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="right" android:paddingBottom="@dimen

Android DisplayMetrics returns incorrect screen size in pixels on ICS

走远了吗. 提交于 2019-11-26 18:42:21
I've tried this.... DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int fullscreenheight = metrics.heightPixels; int fullscreenwidth = metrics.widthPixels; and.... Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; int height = size.y; The Gnex has a display of 720×1280. The returned result for width/height (depending on orientation of course) is never 1280. I thought this might have something to do with the on screen navigation bar in Ice Cream Sandwich, so I

Folder name for 7" hdpi tablet Android

爱⌒轻易说出口 提交于 2019-11-26 17:52:02
问题 I have Tablet with 7" screen (600×1024) with hdpi (240 dpi classification). I have created folder layout-sw600dp . But it's not working in this resolution tablet. Its working fine with 7" screen (600×1024) with mdpi (160 dpi classification). Which folder should I create for 7" (600×1024) tablet which has hdpi (240 dpi classification)? 回答1: It depends from the Android API version you're building against, like mentioned here: ... However, this won't work well on pre-3.2 devices, because they

Android DisplayMetrics returns incorrect screen size in pixels on ICS

浪子不回头ぞ 提交于 2019-11-26 06:31:18
问题 I\'ve tried this.... DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int fullscreenheight = metrics.heightPixels; int fullscreenwidth = metrics.widthPixels; and.... Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; int height = size.y; The Gnex has a display of 720×1280. The returned result for width/height (depending on orientation of course) is never 1280.