Android :: Android Multiple Screen Sizes With Same Density
Apr 14, 2010
I'm confused regarding the densities. I see that with medium density, the screen resolution could be either 320x480, 480x800, or 480x854. So if I have an image thats 300px wide in the mdpi folder, how is it going to look the same size on all 3 different screen sizes (mainly 320x480 vs the other 2)? And by look the same size, I mean scale to be bigger or smaller depending upon the screen size.
View 5 Replies
Apr 22, 2010
I've been reviewing the Supporting Multiple Screens documentation on the Android and I just need some additional clarification...
It's my understanding that designing three unique interfaces (ldpi, mdpi, and hdpi) would be the best way to go about supporting all the potential android screens with minimal scaling/distortion.
Yes, I know there are similar questions posted, however... If I create an image for the benchmark mdpi (let's say my image is 300x210, just for example) how to I determine what size I will need to recreate that image at ldpi & hdpi? This post as well as a google search leads me to believe that ldpi is just 75% of the mdpi image, and the hdpi is 150% of the mdpi image. Is this accurate?
View 1 Replies
View Related
Dec 16, 2009
I have created layout-large and testing against android 2.0.1 WVGA. however, its picking layout-normal. Can anybody suggest me what I am doing wrong. Even though, I have 3 layouts ( layout-normal, layout-large, layout- small), Its always picking layout-normal. why its so.
I added properties to manifest file
CODE:.............
View 2 Replies
View Related
Jan 19, 2010
I am currently trying to make my app compliant with all screen sizes / api levels. I have this mostly working, however there is 1 issue i cannot resolve: Layouts in the "layout-hdpi" folder are used by and any phone on 1.5 (API level 3). - Which i dont want, i want API level 3 phones to use the "layout" folder. So to resolve this I added "-v4" onto the folder also, this works, the folder is no longer used by 1.5 phones. However, now the folder is also not used on API Level 6 phones, for example the droid. The droid only picks up the folder if i name the folder: "layout-hdpi-v6". (Also if i put "-v3" on a folder, the layout folder is not used by API level 4 phones) My understanding is that the -v<api level> qualifer allows you to exclude phones on an API level that is too low, so -v4 should mean that the folder will be used by all phones on API level 4 and above. I am finding a folder is only used for that specific API level. Has anybody else ran into this same issue? And does anybody know of any possible solutions?
View 3 Replies
View Related
Apr 13, 2010
I've read the Android documentation:
http://developer.android.com/guide/practices/screens_support.html
but still have some questions. I'm trying to design a music application which basically has images of the instrument (ImageButton) that play a sound when clicked. However, I'm confused about how to have the ImageButtons scale to fit all the different screen sizes and how to position them.
Which layout is best used for needing to position ImageButtons in specific locations on the screen? (i.e. cymbals on a drum set) FrameLayout, RelativeLayout? If I only really care about medium and large screens, do I need to create different resources (images) for both as well as a different XML layout to position them? I'm trying to find the simplest way to do this without having to create a separate layout XML file for positioning/size and separate image resources for each screen.
View 1 Replies
View Related
Nov 15, 2010
I read the official document about supporting multiple screens http://developer.android.com/guide/practices/screens_support.html
According to that document, I should just create different directories for different resolultion.
Now the question. How to support devices with normal screen and high density or low density?
I ask it because, there are two posibilities (WVGA800 (480x800) and WVGA854 (480x854)) and (WQVGA400 (240x400) and WQVGA432 (240x432)) and I don't know where to store some background images for them.
I would take drawable-normal-hdpi or drawable-normal-ldpi, but how to make difference between 480x800 and 480x854 or between 240x400 and 240x432?!
View 1 Replies
View Related
Mar 1, 2010
i am developing a game and i need to use android1.5 only.
i wrote sample application using 1.6 and kept drawable-hdpi,-ldpi ... and application is working fine in emulator of 1.6. i made apk and opened an emulator (android 1.5) from command prompt application is also working fine.
in 1.6 if i change emulator resolutions the application UI is resizing. but in 1.5 emulators not.
is that mean, the application developed in android 1.6 runs in 1.5 emulator but multi screen support is not achieved?
..."how to achieve multiple screen sizes in android 1.5". multiple screen support is available from 1.6.
View 6 Replies
View Related
Jul 31, 2010
What I'm trying to do is have a clock widget of different sizes (i.e. 2x2, 3x3, 4x4 etc) in one apk and a configuration activity to be able to select which size to add. From what I've learned from documentation:
Widget size is specified in <appwidget-provider> tag in respective xml file
Also in that file I set up the configuration activity for that provider
So it seems that size is a property of AppWidgetProvider and I'll need to somehow create another provider from the code in configuration Activity of the first one. I have read this and this. First one explains how to put multiple wigets in one apk, but it's not clear how to select between them in runtime. Second one is about changing layouts, but not size.
View 2 Replies
View Related
Dec 7, 2009
I have noticed that when I install some widgets I can later choose from different widget sizes while adding widget. How can I implement that feature in my widget?
View 2 Replies
View Related
Nov 11, 2010
I am trying to develop an application for which I want multiple screen support. I have read the Android article on Best practices for Multiple Screen Support. As per the article we have to follow 3 important things
1. Mention support for different screen sizes(large, medium and small) and any density in AndroidManifest.xml.
2. Place images of 3 dpi's (120, 160, 240) in 3 folders res/ldpi, res/mdpi and res/hdpi.
3. In layout's the dimension should be mentioned in "dip" units. Then Android will take care of the scaling on its own.
I have implemented all these points in my project. The images are picked up correctly from the appropriate folders. But the arrangements of the controls in not same.
e.g. I ran the app on three emulators
1. Resolution 240*320 dpi 120.
2. Resolution 240*320 dpi 160.
3. Resolution 240*320 dpi 240.
(All the emulator have same resolution but different density.)
The problem is the position of the controls is not same on all the three emulator. As per my understanding if the android:layout_marginLeft and android:layout_marginTop are mentioned in "dip" then this problem should not occur. As the density of the emulator increases the controls get placed more towards the right. Is it absolutely necessary that I provide layouts for all combination's of screen dimension and density even if the layout is same for all the devices?
Images:
https://docs.google.com/leaf?id=0By3GYC3k5AMDNzUwNjkwMWEtOGQzZC00MjQ0LWE2OTgtYjFhYzZmM2ExOGVl&hl=en&authkey=CLOEsZsI
View 1 Replies
View Related
Aug 9, 2010
I'm looking at creating an AppWidget and want to have the user select which size they want before adding it. Thus, the user can choose 1x1, 2x2, etc. The Calendar widget in Android 2.2 (and possibly earlier, but not in 1.6) does this. How is this done?
View 11 Replies
View Related
Nov 13, 2009
I've got a quick question about screen size support. Currently, I've got an application that is rockin' along just fine on 1.5 and 1.6. Today the client called and says they want to run on Droid. While I've downloaded the 2.0 SDK, I'm a little wary of compiling against it. Will it break 1.5 and 1.6 compatilbility? How will the "medium" phones (G1, MyTouch) know to use those layouts?
View 3 Replies
View Related
Jul 2, 2010
How to get the screen density programmatically in android?
I mean How to find the screen dpi of the current device?
View 5 Replies
View Related
May 14, 2010
Can you please tell me how can I specify dimension of layout for different density of screen?
i.e. the layout are the same across different densities, but some dimension are different.
how can I do that?
View 2 Replies
View Related
Jun 17, 2010
I'm getting ready to release my first application the marketplace. It's being written for devices running Android 1.5 and above, however there aren't any specific folders for the three different screen densities (I think those came around in 1.6). Should I make these folders myself? Where should I put image resources for the different densities and what should I put in my Manifest?
View 2 Replies
View Related
Oct 15, 2010
I want to develop an application for a tablet of 480*800 screen pixels. I had developed an application for normal mobiles, but now this screen size is large than normal size. what precaution should I take while developing the application? Because device is not available right now so I must have to work on the project using emulator.
View 2 Replies
View Related
Aug 25, 2009
G1, Dream, Magic, Hero, Galaxy and more to come... Does anybody have a rundown of their screen sizes (and of some of the devices to come out)?
View 2 Replies
View Related
Nov 29, 2009
Hello, I would like to ask what settings are necessary for my application to be available on all screen sizes: Is it enough to compile it using SDK 1.6 (but target is set to 1.5 and API level to 3) or maybe I have to set target to 1.6 and API level to 4?
View 4 Replies
View Related
Apr 27, 2010
supporting multiple screens (sizes and resolutions). I´ve searched not only this forum but many different websites and the android documentation but I´m probably doing a small mistake so things are not working properly.
Well, my main layout was designed with a HVGA screen, and it works great. When I try the same app on a WVGA, FWVGA, WQVGA or FWQVGA, I always get an unused space in the end of the layout because the screen ´s "heightnes" is proportionally bigger than HVGA´s.
So I consulted the documentation and decided to give a try on resource qualifiers, so I then created a nonsense UI and placed it on layout- large, created a new AVD using the WVGA skin and launched the app. Well, all I got was my old and not well stretched layout. The same happened to a FWVGA AVD.
This is the first problem. The second is: medium high density medium size screens and medium density large screens have the same resolution: how can I create a layout that is loaded for both, but not for (for example) medium size medium density or small size medium density screens?
View 10 Replies
View Related
Feb 28, 2009
I'm being confused by the 'screen density' concept in Android. I knwe that dpi (dot per inch) came from the printing device. 160 dpi means 160 dots in every inch on the paper. However, when dpi is used for the screen density, for example, what's mentioned '160 dpi screen' in Android document, what's the meaning? 160 pixels on every inch of the display?
As described in http://code.google.com/intl/zh-CN/android/reference/available-resourc..., 1 dip (density-independent pixel) means 1 pixel on a 160 dpi screen. Why does the ratio of dp-to-pixel not necessarily change with the screen density in direct proportion?
When the dpi is changed from 160 to 80, how many pixels will 1dp will take? 0.5?
I can hardly understand why dip/dp is introduced into Android.
View 6 Replies
View Related
Mar 28, 2010
I have read the documentation on "supporting multiple screens" but can't seem to figure it out. I mean, i understand that resolution effects it but it just doesn't make sense to me that the droid and the T-Mobile G1 both use the regular "layout" directory. I developed the app on a droid and got everything to work but there is one view that i need to use hard-coded pixels.....which im using dpi. Now when installing the app on the G1 things on that view are getting cut off because the G1 has a much smaller screen. If I redo it to work on the G1 then everything is all squished together on the droid and even tho everything is visible this way, it looks silly.
I tried using the different attributes in my manifest but that didn't help but since i'm using minSDK as 4, the support different screen size attributes are true by default anyway.
Am i missing something very simple and obvious or is it just the way it is?? Isn't the physical screen size of the G1 like an 1" smaller?? I'm still kinda new to Android development so forgive me if i am missing something simple.
View 3 Replies
View Related
Jul 1, 2010
I'm currently developing my first android app, and my first game. I've been developing on a netbook with a CliqXT (HVGA). Things are going well, it renders perfectly on the smaller screen. I knew I'd have some issues when rendering on larger screens, but the issues I'm having are not what I was expecting and I'm kind of stuck.
So basically the game consists of a main SurfaceView which I'm rendering the tiled game world on to. I followed this tutorial to get started, and my structure is still pretty similar except that it calculates the boundries based on the player location:
http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,654.html
The game also has various buildings the player can enter. Upon entering it launches another activity for that particular building. The building activities are just normal Views with Android UI stuff defined in XML (Buttons, TextViews, etc).
What I expected to happen:
So I expected the the building UIs to render correctly on the larger screen. I specified all dimensions in "dp" and fonts in "sp" in hopes that they'd scale correctly. I expected the actual game tilemap to render generally correctly, but maybe be really tiny due to the higher resolution / dpi. I'm using a very similar function to the tutorial linked above (calculateLoopBorders(), my version is pasted below) to calculate how many tiles to render based on screen height and width (getHeight() and getWidth()).
What is actually happening:
The whole game is just being rendered as if it's HVGA. The tilemap, and the building UIs are just scaled down to the smaller screen size, leaving black borders around the left, right, and bottom (see images).
View 2 Replies
View Related
Aug 12, 2010
With the many devices available, each with different screen density and resolution, I am wondering - how many versions of an image should I make for the different device screen sizes? Is it 3? small, medium, large or just 1.
View 4 Replies
View Related
Apr 4, 2010
I tracked the behaviour of the different screen sizes when I increased the position of a graphic by 10 pixel. Unfortunately happened what I already thought. When the display is bigger, I'm able move a graphic a lot of times more to get to the bottom of the screen. So the ratio between the graphic and its environment is not correct anymore (so not 10 pixel as on normal screen) although the change of the graphic on the different screens looks correct (On big screen it is bigger, on small screens it is smaller). When I move the graphic from the top of the screen to the bottom, I can move that on 480x800 about 65 times, on 480x854 70 times, and on the 320x480 screen only about 25 times. So the target must be to calculate the right ratio so that 10 pixels on the small screen are 17 pixel (or sth. similar) on big screens. What approaches do I have to do that? I already thought about getting the value of res.getConfiguration().screenLayout to know if I have a small, normal, or big size to be able to calculate anyhow the right ratio, but this both seems to be pretty cumbersome and moreover I get values from res.getConfiguration().screenLayout I can't explain. I launched 6 emulator instances and got the following values from res.getConfiguration().screenLayout:
240x320 QVGA low density: 17 320x480 HVGA medium density: 18 480x854 WVGA high density: 34 480x800 WVGA high density: 34 240x400 WQVGA low density: 34 240x432 WQVGA low density: 266435490 (yes, I really get this value!)
This approach seems to be useless because I cannot even distinguish between 480x854 and 480x800, much less of the last value which seems to be corrupt.
How can I solve it to move a graphic on the different screens with the right ratio? How do game developers solve this when they support all screens?
View 5 Replies
View Related
Jun 1, 2010
I am a current iPhone 3gs user migrating over to Android this Friday and getting the Evo 4g. Now, all iPhone/iPod touch screen sizes are the same and all the hardware specs are the same for the most part, but with Android you all kinds of resolutions, screen sizes, processors, etc etc...
Are all apps made for Android stretched to accomodate bigger screen sizes? For instance, I have played with my friend's Droid on Verizon and the screen is 3.7" at a resolution of 854x480 and he has showed me games on it like Gameloft's NOVA which is a full 3D first person shooter. So his phone essentially has a bigger resolution slightly than the HTC EVO 4G but smaller screen size (3.7" vs. 4.3"). So would the same game be stretched to fit my phone?
I'm wondering with different apps, are there any conflicts in relation to different spec phones?
View 3 Replies
View Related
Nov 23, 2009
Some of my application's users are on android 1.5, some on 1.6, and some 2.0. So how do I release my app for all customers? If I release a 1.5 version, then the 1.5 phone can use it - but not the newer phones with smaller screens (aka Tatoo), they require 1.6 or higher? correct?
View 4 Replies
View Related
Jan 12, 2010
I have an image put on an ImageButton, which looks good on a mdpi (medium-dpi) screen. However, when the device has a hdpi (high-dpi) screen, the image is still pixel-by-pixel accurate, which look small on the device screen.How do I make such that the image (and therefore the ImageButton) scaled based on the density-independent pixels (dp or dip) instead of pixels?
View 3 Replies
View Related
Oct 30, 2009
I have had several emails from people with HTC Tattoo devices who say they cannot find my app in the Market.
After reading this page (http://d.android.com/guide/practices/ screens_support.html) I believe I have to add the <supports-screens> tag to my manifest file. However, when I try to do this I am confronted with "Error no resource identifier found for attriute support-screens in package 'android'" messages. What does one have to do to update their manifest to tell the market an app supports all screen sizes?
Furthermore, if I need to change the android:minSdkVersion from "3" to something higher or add the android:targetSdkVersion tag, will this prevent people with older versions of Android from using my application?
View 4 Replies
View Related
Aug 31, 2010
As you know android today is many versions many constructors, many screen sizes,...
it's quite difficult for developers today to write programs that targets a big part of devices.
What would be THE developer must-know practices for this ?
View 4 Replies
View Related
Apr 15, 2010
I have an image on a private file.
I read the file, create the drawable, and assign it to an ImageView.
The ImageView has WRAP_CONTENT so the size is automatic.
On 320x480 screens, the image looks good
But on screens with more resolution and high density 480x800 or 480x854 (N1, droid) , when the image is for example 150x150, I see the image as 100x100.
Of course it has something to do with the density but not sure how should I resolve this.
This is my code...
if I then inspect the size of the icon, android thinks the size is 100x100, when really is 150x150.
Looks like its reducing the image by the density.
Can anybody explain this and how to avoid this.
View 1 Replies
View Related