Android :: Multiple Resolution Support And SurfaceViews
Aug 7, 2010
I am having an issue understanding how to get Bitmaps from resources in density specific directories to scale properly when drawing them to a Surface View.If I have a resource in folder "drawable" I expect it to be scaled up when run on hdpi screens and scaled down on ldpi screens and left as is on mdpi or 1.5 screens.Likewise I expect anything found in hdpi when run on an hdpi screen to remain unscaled. However, there is some combination of settings that I am not getting right to do this seemingly simple thing.I am not running compatibility mode so my manifest supports all screen sizes with anydensity=true.I do not understand the BitmapFactory.Options fields of inScaled, inTargetDensity, and inDensity that I am thinking have to be set appropriately and slightly different for each resource decoded depending on which directory they were found in and what screen they are currently run on.
All I have been able to find is that if either inTargetDensity and inDensity are 0, no scaling occurs, but if not, scaling occurs such that inDensity matches inTargetDensity. Is this correct?I have no idea what valid settings are for these fields from the documentation other than ints.What are the integer values for LDPI, MDPI, and HDPI? And how do I determine the density of a resource in order to set this before I decode it? Am I way off base in my approach for drawing bitmaps from various resource directories on various screen sizes?
View 2 Replies
Apr 15, 2010
In my android application, I would like to support multiple screens. So I have my layout xml files in res/layout (the layout are the same across different screen resolution). And I place my high-resolution asserts in res/drawable-hdpi
In my layout xml, I have
CODE:...........
And I have put bkg.png in res/drawable-hdpi
And I have started my emulator with WVGA-800 as avd. But my application crashes:
CODE:................
View 1 Replies
View Related
Jul 12, 2010
I am new to android. For getting more number of downloads. I will make application in Android 1.5 version. How can I support multiple screen resolution from android 1.5 version. Is there any problem develop application in Android 1.5 and release in market. Is it visible to higher version mobile market for downloading apk file.
View 5 Replies
View Related
Jun 26, 2010
I have a program that should work on Android 1.5, but when it's run on newer devices with higher resolution screens, it should support the full resolution and not emulate a lower resolution screen. As far as I can tell from the documentation, this should be simple.
I just specify
code:.........
The problem is that if I tell Eclipse to compile for 1.5, it refuses to accept this. It reports an error (targetSdkVersion is an unknown tag) and refuses to compile or run. If I tell it to compile for 1.6 it works fine, of course. But if I then try to install on a 1.5 AVD, the program immediately crashes with a java.lang.VerifyError. I'm clearly missing something simple. How do I get it to compile an apk that works under 1.5, but still includes the targetSdkVersion tag?
View 3 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 19, 2010
My application will have two layouts, one for large screens and one for normal. For testing I'm working with one phone (800x480 240dpi) and one tablet (1024x600 240dpi) but both are detected as large screen hdpi and long aspect ratio, so I'm not able to assign different layouts.
The only approach I think that can work is to create layout-large and layout-normal, get the resolution and programmatically set the layout folder. Is that possible?
View 6 Replies
View Related
Feb 20, 2009
I want to know when will Android support Multiple PDP.
View 15 Replies
View Related
Jul 27, 2009
I have two SurfaceViews in one FrameLayout. So they are stacked upon another. What I want to achieve is to use the lower SurfaceView as kind of background that is changing heavily, and the upper SurfaceView as annotation overlay. So the upper SurfaceView has a (small) number of quickly changing elements that I will draw. Somehow, I can always only see one of the SurfaceViews, depending on which one is top. I thought that SurfaceViews are always transparent, but it seems I am missing something here.Any thoughts on why I can't overlay two SurfaceViews?
View 9 Replies
View Related
Oct 19, 2009
So I'm trying to make sure my apps are compatible with the 1.6 SDK emulator skins WVGA800 and WVGA854. The Android Developers Blog post regarding this seems strange to me. The post talks about upgrading your app using the 1.6 SDK, then says this:
"Note that not all devices will be upgraded to Android 1.6 at the same time. There will be significant number of users still with Android 1.5 devices. To use the same apk to target Android 1.5 devices and Android 1.6 devices, build your apps using Android 1.5 SDK and test your apps on both Android 1.5 and 1.6 system images to make sure they continue to work well on both types of devices."
Now resource directory qualifiers (e.g. "res/drawable-mdpi/" or "res/ layout-large") don't work with the 1.5 SDK. So right now as a dev I have the choice to either:
1) Update my apps with the 1.6 SDK so that they are compatible with the various 1.6 emulator skins and the various hardware configurations coming out. If I do this, the updates will not be available to those users that still have 1.5, which is a "significant number of users."
2) Continue using the 1.5 SDK, without the available tools in 1.6, but try to somehow get my app to render properly in the various 1.6 emulator skins.
View 9 Replies
View Related
Sep 2, 2010
If I run my android application with htc magic with locale English. I find my application running properly and if I find to run it on Motorola droid with locale Korean, I find even my application(apk) cannot be installed on the device. Do android support different language? Is it because of different language OS version?
View 3 Replies
View Related
Oct 21, 2009
If an android device wants to support multiple cameras, then how does the API support this? Right now the framework API is a simple static method to create an instance of camera Camera.open(). I see couple of options:
1. Using camera.setParameters() to set a name/value pair that instructs which camera to choose?
2. It would be nice and cleaner perhaps if this was done right on the open() method perhaps with additional enum.
Obviously option # 1 would not result in any addition to the API. Does this use sound right to you to support multiple cameras?
View 4 Replies
View Related
Jul 27, 2010
I've just switched to launcherpro from sense, and the one thing I miss is the news widget. On sense in had three full page widgets devoted to it, and I need a replacement! Requirements are:
Full page widget
Multiple homescreen support
Simple aesthetics
Customisable news feeds
View 33 Replies
View Related
Dec 9, 2009
I have a project compiled with and targeting 1.5. I now want to support different screen sizes instead of letting android handle the scaling.That's all I need to do, right? All my layouts are using dip, so it should scale, and I don't want to mess with different size bitmaps just yet.
View 1 Replies
View Related
Mar 6, 2010
I want to develop UI of the application which looks similar on all screen sizes. I have gone through the Android developer article regarding this. I am using supports-screen tag but then also the screen is displayed not displayed properly in the larger screens. The screen is displayed properly in HVGA and not in WVGA.
I have developed the application using Android 1.6 and set the minimum SDK version as 4. The application is running properly on HVGA avd but not on WVGA avd. Can I know the reason for it? Is there any solution for this? I want that the user interface of the application should look uniform in all the handsets.
View 3 Replies
View Related
May 21, 2010
I'm an application developer, trying to develop a graphics application. I have been trying to get multiple windows each rendering their view up for quite sometime with no headway. I have gone through the documentation but have not come across any technique to enable multiple window support. Does Android have multiple window support as of now?
View 4 Replies
View Related
Jul 23, 2010
I am looking for a weather app that supports multiple cities like an iphone weather app. I have tried many apps, but could not find the one that I want.
View 9 Replies
View Related
Sep 25, 2010
I'd like to have two GMail (Google Apps mail, if that makes a difference) accounts active at once, both getting new mail notifications, and having the ability to send and reply through both accounts. My current solution is to simply forward all of Account #2's mail to Account #1 -- but then I can't send. Am I missing an option here? Surely this must be possible on Google's OS.
View 3 Replies
View Related
Nov 9, 2010
I want to know if it is possible to support multiple profiles within Android? To explain my question better, can we have two or more applications, which uses a Data Call, operating simultaneously in Android? For e.g. is it possible to have one IM, one e-mail application and one SNS(like Facebook) operating simultaneously in Android phones? If yes, I want to know how this is being handled within the Android Stack code. Since the platform code is open source, any suitable reference to any portion of the code handling this behavior would be perfect.
View 1 Replies
View Related
Jun 12, 2009
I created a custom SurfaceView called CaptureView and tried to add it into main.xml file.The application seems to work fine but if I switch from main.xml tab to Layout in Eclipse the text NullPointerException appears instead of layout preview.Does anyone know how this issue could be solved?
View 2 Replies
View Related
Sep 15, 2009
As suface flinger uses fb0 for rendering the image and video. i want to change the frame buffer devices dynamically for rendering the image on the screen one time on Fb0 other time on Fb1. i am looking into the surface flinger code. but we are not able to get the pointer where to change for this. can simeone please give us some pointer.
View 3 Replies
View Related
Nov 11, 2010
I am trying to develop an app 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 necessary that I provide layouts for all combinations of dimensions and density i.e. in layout-small, layout-large, layout- medium, layout-long,layout-notlong?
View 2 Replies
View Related
Jul 14, 2009
I'm a new Android developer. I would like to make a simple game using the SurfaceView (Canvas drawing).the game has a a custom Object name Box. Box can draw itself and need to get an event when it is clicked. when it does, there is an animation sequence coming out of the box like a "jumping clown". I have several Boxes on the screen when each of them can be activated. Several Boxes animation can also be presented simultaneously.Here it gets tricky: Since I have a "complicated" animation sequence, each Box extends SurfaceView. The problem is I haven't figured it out how can I handle several SurfaceView's drawing using only one Thread (in order to present an animation I need to use one) and also how can I get the onClick/ onThouch event from my Activity to each of my Boxes.
The LunarLanding example in the SDK uses only one Thread but also uses only one SurfaceView which manage the animation of the game components (there are no several game components SurfaceViews). Also, there is no need to get onTouch event, so this example doesn't match to my case. I have several questions about what is the right approach do code this:
1. Should I use Box extends SurfaceView?
2. Can SurfaceView gets user events like onTouch/onClick?
3. Is there a way to add to the "main" SurfaceView another SurfaceView (Box)?
4. If none of the above questions is positive, should I use one SurfaceView (and one Thread) and try to map the other Boxes on the screen for user event handling. I mean Box only paints itself but the user event is being handled by me (not by the OS).
5. Should each Box (SurfaceView) should handle it's own Thread in case of animation (it is not good design but it is also an option)?
6. do you have any other proposal?
View 4 Replies
View Related
Jun 12, 2010
I was wondering if the Evo supports multiple exchange accounts. I have a coworker that has a stock nexus one and he is able to add multiple exchange accounts effortlessly. I know that there are alternative solutions like touchdown and roadsync but why would a stock nexus one be able to and we are not. I would rather not have to install a 3rd party app to get the same experience. Is this a limitation of our version of android or did HTC take this out?
View 8 Replies
View Related
Aug 30, 2010
Did HTC add support for Multiple Exchange Accounts yet, or do you have to root and not use sense to get that?
View 3 Replies
View Related
Jul 7, 2010
Does the aria support multiple exchange accounts?
View 5 Replies
View Related
Apr 3, 2013
one can have multiple twitter, email etc. accounts on Android (running 4.1.2 on a Galaxy Note), but only one Facebook account. However, I have two of them and I need *both* their contacts sync'd to the contacts database (one is my "private" profile for close friends, the other is for work colleagues etc). Also, the built-in Facebook authentication has the same problem as the contact sync - I don't want to run games like Real Racing under my "public" FB profile.
Any way to make two FB profiles on one device? Maybe with something like a "virtualization"?
View 1 Replies
View Related
Jul 17, 2010
My wife just got the Droid Inc, which was my first experience with the android os and I have to say, wow! I love it! My only issue is the Droid Inc doesn't support more than one exchange accounts and I have 6. I have read that the original Droid did support multiple exchange accounts, but haven't seen if the droid x does or not. Before I go through the trouble of ordering one and waiting on it to come in, can anybody confirm or deny if the droid x does support multiple exchange account and if so, is there a limit to that number.
View 11 Replies
View Related
Nov 13, 2010
I use my phone in English, but often send and receive text messages in Spanish (and other 2 languages...) What do I have to install/do/change to make the phone able to at least read and correctly render text messages received in Spanish?? I just get a bunch of "?" signs when there are special characters.
View 1 Replies
View Related
Oct 28, 2009
I have a few scenarios where I guess I am not alone with. There is no easy solution but this has to be on top of the list I think.
1. Suppose you have an application that is compiled with 1.5 and is working fine even if started on a 1.6 device. But you now want to support other resolutions, so you need to compile with 1.6. Problem: If I recompile and publish the new apk, the 1.5 users want see my applications. Users already downloaded my application can not upgrade. (will there be a "new version" available shown to them in the market?)
2. Lets say your application works fine on 1.5 and 1.6 and you decided to publish your application twice with different package names. "MyApplication 1.5" and "MyApplication 1.6" for example. Problem: The user upgrading from a older version does not know that there is a new version, because you published a new Application. You can write it into the description and tell the user to download the 1.6 version but many users might not read that Settings from the other application are lost. Your downloads are split into two applications, so you might not make it into the top ranks that easy . You might even need to publish 4 applications if you have a light and a paid version.
3. Now 2.0 SDK is available and you want to add multi touch features or any other new stuff for all 2.0 users. Problem: The above problems are getting even worse. There is no way to easily upload multiple apks for the same application. Having to rename the package is also not making this better. Every time svn freaks out and marks everything as new. Sharing code between versions is difficult because of that.
I don't know if its just "3" (provider in Austria), but I still have not received an official update to 1.6. Testing on the real device is not possible with a 1.6 image if you don't want to root your phone and update the rom manually. 2.0 will be on some devices soon, so there is definitely a need to support all 3 versions. There should be a faster update cycle for the users or a slower update of new versions meaning bigger steps. or We get an easier way to support multiple versions. This also means we need a way to know how many actual devices with version 1.5 / 1.6 / 2.0 are already sold and/or upgraded. If i know that 1.5 is only on about 5% of the devices left, then I can just stop supporting that version and upgrade.
View 4 Replies
View Related
Apr 8, 2013
How do I convert phone resolution Bootanimation to tablet resolution?
I have 4 boot animations that I want to convert to work on my Nexus 10 full screen.
Also, how to be able to edit [URL] to show 10 instead of 4 or completly remove the number so it works nicely on both my Nexus 4 and Nexus 10.
View 1 Replies
View Related