Android :: Drawable From Mdpi Loading Instead Of Hdpi

Apr 29, 2010

I have set up my project with different drawable directories (ldpi, mdpi and hdpi). I have a background png with two different resolutions: 320x480 in drawable-mdpi folder, and 480x800 in drawable-hdpi. Both have the same filename. When I try to load the background as a style in the manifest (using android:windowBackground in the style) if I use the emulator for a 1.6 device, I get the correct one loaded(mdpi). However, if I try this on my Nexus, I see that at first the correct background from the hdpi folder is loaded, but it quickly switches to the mdpi one. I have tried also to set up the background in the layout xml file (android:src=...) but in this case only the mdpi one is loaded. If I delete the mdpi version, everything is loaded ok. Any idea on what is the problem?

Android :: Drawable from mdpi loading instead of hdpi


Android :: High Density Emulator Use Drawable Mdpi Folder Instead Of Drawable Hdpi

Oct 19, 2010

I am running my application in the emulator using a high density skin (like WVGA800). However the ressources in my application are loaded from the drawable- mdpi folder instead of drawable-hdpi ... what else should I do so that android use the correct folder ?

View 4 Replies View Related

Android :: Emulator With WVGA Loading Image From Drawable Mdpi?

Jun 2, 2010

I read about in the google documents that the 3 folders corresponds to different screen types and that android would select the image from different folders automatically according to the screen type. I read that WVGA will load from drawable-hdpi and HVGA will load from drawable-mdpi. When I tested with 2 emulators both running 2.1, each with HVGA and WVGA. It turns out that they are both reading the image in mdpi. If I deleted the image in mdpi then they read from hdpi. Can someone answer why emulator with WVGA is reading from drawable- mdpi?

View 4 Replies View Related

Android :: HDPI And MDPI ?

Aug 26, 2010

All these days i used to test my application on my HTC Legend (2.1 OS) only, and i had all my images resources in drawable-hdpi folder.. and everything worked fine

and today i wanted to test my Application on Android 1.5, so i recreated all the images with lower resolution and kept it under drawable-mdpi folder, so now i have High resolution images in drawable-hdpi folder and lower resolution images in drawable-mdpi folder..

Everything looked great on both the HTC Legend and Emulator(with Android 1.5)

Later i found out that the images in drawable-mdpi are shown in my HTC Legend too and not the images in drawable-hdpi in my manifest file i have also included <uses-sdk android:minSdkVersion="3" /> <supports-screens android:anyDensity="true" />

I want to know as to why the images in drawable-hdpi are not used?

View 2 Replies View Related

General :: Resize PNG From MDPI To HDPI?

Feb 16, 2012

Any app which can mass resize .png from HDPI resolution to MDPI!

I had seen a similar app for MAC but any such application for windows!

View 9 Replies View Related

Android :: Eclipse Emulator - Runs WVGA (hdpi) As Mdpi Screen

Jul 22, 2010

The problem I am having is that when I run a FWVGA or WVGA sized emulator it sometimes runs at a MDPI size instead of HDPI. Here is an example with pictures. I create the AVD with the proper hw.lcd.density setting and screen size and it randomly does this. There doesn't seem to be a pattern. I used to be able to just delete the AVD and create it over again and it would fix itself for a while but now it's getting worse.

View 1 Replies View Related

Android :: Why Looking For QVGA Resources In The Wrong Order Mdpi - Hdpi - Ldpi

Feb 15, 2010

Im trying to do some testing with a QVGA emulator and I find that it looks for an image resource in the mentioned order.

drawable-mdpi 1st
drawable-hdpi 2nd
drawable-ldpi 3rd (it does get found only after i change the name of the image in the other two dirs for testing)

I would expect it to be ldpi first.

When running other emulators (HVGA and WVGA) they use their appropriate drawable dirs... its only QVGA. The only code that I see could affect this is here (based on the docs)

I have tested this with a 2.0 emulator and a 1.6, i get the same result.

View 2 Replies View Related

General :: How To Resize HDPI / MDPI 9 / PNG IMAGE To LDPI

Apr 9, 2013

how to resize 9/png images(HDPI/MDPI) to LDPI SIZED?

View 1 Replies View Related

Android :: Gallery3D Apk Does Not Contain Drawable Hdpi?

Feb 22, 2010

I have built android 2.1 on freescale's i.MX platform. But after running Gallery3D, it will crash with the log of failed to load resource. I found that the whole drawable-hdpi/ (it really contains in the Gallery3D source code res/) is not in the apk package, and cause lack of drawable-hdpi/icon_cancel.png. The apk only contains drawable-mdpi/ and drawable/. My question is why the drawable-hdpi/ resource is dropped when building apk? Per my understanding is that, which drawable-* resource loading is determined on runtime, and all the drawable-* should be in the apk package.

View 7 Replies View Related

Android :: Drawable Hdpi Not Appearing In Eclipse Emulator

May 11, 2010

I made each image a different color so I can tell if it is loading the right image. When I test my program on different density screens it only chooses the mdpi images. It scales them to match the correct dpi but doesn't choose the right folder. It just defaults to mdpi. In the manifest I have, android:normalScreens="true" android:anyDensity="false"

Anyone have a similar problem? I'm sure it is something simple that I am overlooking but I can't figure it out. From what I read on the Android Support Multiple Screens guide is that you should just have to put the different density images in their correct folders and Android will do the rest.

View 5 Replies View Related

How To Move Set Of Images In Resources / Drawable - HDPI To Assets Folder

Dec 13, 2013

I am trying to move a set of images currently in the resources/drawable-hdpi folder to the Assets folder.

These images are copied to the private application directory when the app is installed.

When I do this the resulting image is smaller than when I had the image in the resources folder. i.e. the baked beans image is smaller than the others. If I load the baked beans images from the drawables folder it is the same size as the other product images.

I have tried to scale the image but it has no effect.

public View getView(int position, View convertView, ViewGroup parent)
{
ImageView imView = (ImageView)rowView.findViewById(R.id.product_thumb nail);
ImageView imProduct = (ImageView)rowView.findViewById(R.id.product_icon) ;
tvName.setText((CharSequence) values.get(position).getName());

[Code]...

View 4 Replies View Related

Android :: Loading Images As Drawable Objects From URL

Jul 30, 2010

I am presently using the following piece of code to load in images as drawable objects form a URL.
Drawable drawable_from_url(String url, String src_name) throws java.net.MalformedURLException, java.io.IOException { return Drawable.createFromStream(((java.io.InputStream)new java.net.URL(url).getContent()), src_name); }

This code works exactly as wanted, but there appears to be compatibility problems with it. In version 1.5, it throws a FileNotFoundException when I give it a URL. In 2.2, given the exact same URL, it works fine. The following URL is an sample input I am giving this function.
http://bks6.books.google.com/books?id=aH7BPTrwNXUC&printsec=frontcover&img=1&zoom=5&edge=curl&sig=ACfU3U2aQRnAX2o2ny2xFC1GmVn22almpg
How would I load in images in a way that is compatible across the board from a URL?

View 2 Replies View Related

Android :: Images From Drawable Folder Loading Scaled

Oct 18, 2010

I recently rebuilt my project to target 2.2 from 2.1. In the old project, I did not specify a target SDK (the manifest did not contain something like:
<uses-sdk android:minSdkVersion="8" />).
This gave me an error in the console when running, but everything worked fine so I didn't fool with it.

The new project now uses <uses-sdk android:minSdkVersion="8" /> in the manifest. But now my drawables from the /drawable-nodpi/ folder are loading with scaling, making them much smaller and significantly changing the desired visuals. If I cut out the <uses-sdk android:minSdkVersion="8" /> tag from my manifest, they load properly without scaling.

Even when loading my images like so:
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false; Bitmap bm = BitmapFactory.decodeResource(_resources, resId, opts);
They are still scaled when I declare the minimum SDK in the manifest, but not scaled if I remove that tag. How can I load them without scaling while still declaring the minimum SDK?

View 4 Replies View Related

Android :: Can 140 Dpi Will Get Mdpi Resource

Jul 8, 2010

In android docs, it is said that 140 still is ldpi, but when I change dpi to 140, I find mdpi resource is retrieved, can someone have idea? thanks a lot. btw, I read the code about how to get resource, seems ldpi's max dpi value is 131.25? Does google post the wrong doc?

View 1 Replies View Related

Android :: Nine Patch Pre-scaling On Hdpi

Jan 5, 2010

I have some 9-patch images on my app, and they work great on the medium density. When I load the app on a High density emulator/device, these images look grainy. It happens only to 9-patch images. The others look great after the pre- scaling. Is there a way to make them look good after the scaling, like the non-9-patch images?

View 10 Replies View Related

Android :: Displaying A Now Loading Image While Applic - Loading

May 4, 2009

I want to display a fancy 'loading' image at my app's startup time.

The problem: my startup code is mostly GUI related, hence needs to run on UI thread.

Is there a way to do both - that is run UI-related code on UI thread while an image is displayed to the user?

View 8 Replies View Related

Android :: Proper Way Of Resizing An Image To Put In A Ldpi / Hdpi Screen?

Nov 24, 2010

What is the proper way of sizing the dimensions of an image in a hdpi screen vs a ldpi screen.

For instance, an 89*80 png displays fine, with the text, on my droid 2....but how should I go about resizing the image to be smaller on a smaller screened droid? Do I manually alter the image and place it in the ldpi folder or will it do that automatically?

View 1 Replies View Related

Android :: Stay Backwards And Forwards Compatible - TargetSDKVersion Hdpi MinSDKVersion?

Apr 16, 2010

Here's my situation: I have an app that's been compiled using 1.5 SDK and minSdkVersion=3. Now I want to add 2 icons: one for high density screens like Droid and another one for low density screens like G1.

For this, I added the high density icon to new directory drawable-hdpi- v4/. I then compiled using 1.6 sdk and added targetSdkVersion="4" to the manifest. minSdkVersion is still 3.

This is working in limited testing, but I'm not sure if I have done everything correctly.

I have many questions:
1. By specifying v4 in drawable-hdpi-v4, the icon will not be displayed to 1.5 or below OS's. But what about users with 2.0 or higher SDK's? Will they get the non-hdpi icon, since they will have v6 or v7 ?

2. The documentation for targetSdkVersion states, "Specifying this target version allows the platform to disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility)". Does this mean that my app will not be forward compatible as soon as I specify a targetSdkVersion? What exactly is being turned off?

3. Even if I leave out the targetSdkVersion="4", the app runs ok. So do I really need it?

4. Should I be using the latest SDK (2.1) and setting that as the targetsdkversion and compiling against that? Or some other combination of targetsdkversion and compiling sdk? I'm not using any API's that are not in 1.5..

5. Is any of this related to why some of my HTC Eris users have complained that they can no longer find my app in Market after upgrading to 2.1?

View 3 Replies View Related

General :: Changing Stock Icons (HDPI)

Jul 14, 2012

I am making a ROM. And I'm trying to change the stock icons. I've tried every posssible way but i just can't change them. I'm trying to theme Holo Launcher with custom icons. The icons I have are hdpi. So i don't know how to turn them to mdpi. Is there any way i can turn it to mdpi on my PC. And what are the icons supposed to be renamed as well as which directory am i supposed to place them.

View 1 Replies View Related

General :: Trick Theme Chooser HDPI

Aug 21, 2012

is there anyway to trick cm9/aokp theme chooser to think that my device is hdpi, instead of mdpi, without lcd density changer hack most HDPI themes, if not all(with the exception to lucid) work on mdpi devices yet theme chooser doesn't allow me and will give me a compiler error.

if the above does not work. is there anything i could change in the theme apk, whether its an xml, or image or anything I could change to make theme chooser think that i am using an MDPI theme, even if the theme includes hdpi images? THE "APPLY HDPI THEMES TO MDPI PAGE, LCD DENSITY CHOOSER PAGE.

View 8 Replies View Related

General :: How To Port XHDPI Roms To HDPI Devices

Aug 6, 2013

how to port xhdpi roms to hdpi devices? what other steps do we have to take ? im trying to port paranoid android 3.69 to xperia u basing cm 10.1

View 1 Replies View Related

Android :: Home Screen Widget Size For Large Screen Or Hdpi?

Mar 30, 2010

From Android widget screen guidelines,we know that, home screen has 4*4 cells, and in portrait orientation, each cell is 80 pixels wide by 100 pixels tall. I think these are for baseline HVGA screen. How about for large screens and hdpi screens, do they still have 4*4 cells for widget and each cell in portrait orientation is still 80 pixels * 100 pixels?

View 2 Replies View Related

Android :: Loading Activity Darkens Screen - Loading Screen

Nov 2, 2009

I've looked through the documentation and I can't seem to figure out how to have the screen blured/greyed when I select an activity that may take a while to load.

This seems to be an Android standard (both the Camera app and the Camcorder app do it when first selected), but I don't see any documentation on it. I even tried looking through the source of these apps on git, but couldn't seem to find it.

View 3 Replies View Related

Android :: Res / Drawable / Not In Eclipse?

Aug 25, 2010

I am new application development. I am using Eclipse for making applications. When trying to create new project using Eclipse It is not creating simple res/drawable/ instead its creating three drawable folder. i.e. 1] drawable-hdpi 2] drawable-ldpi, 3]drawable-mdpi What is this all three for? General scenario as per Google it needs res/drawable/ to save icon image. Now on Eclise where to save icons? On all folder or?

View 4 Replies View Related

Android :: Add XML Drawable In Eclipse

Oct 19, 2010

According to official documentation Google says that "Once you've defined your Drawable in XML, save the file in the res/drawable/ directory of your project." is the way to add a XML drawable to the project. But when I created the project ADT created 3 different drawable folders for mdpi, hdpi, and ldpi. So when I wanted to create my XML drawable, I right click on my drawable-hdpi folder and select "Add new Android XML file", and there I have to select what kind of XML file I want to create, but there isn't "drawable" to select. If I create new text file and save it as button_drawable.xml Eclipse says that there is an Error in the file and that It can't build my project.

View 3 Replies View Related

Android :: Set Drawable Without Using Lot Of Images?

Oct 3, 2010

When i have an ImageButton and a drawable and i want to do something like the Drawer or Twitter where when i press the button and the corner of the image is highlighted over the edge, in drawer its yellow, in twitter its white. Like the one below.How do i set my drawable without using a lot of images?

View 1 Replies View Related

Android :: Is This Built In Drawable?

Feb 8, 2010

In this linked image , I see the button on the right quite often in a lot of apps. On my Moto Droid, it is used extensively in the settings app. It is also used as the default AlertDialog icon. Can I use this via a android.r.drawable?

View 2 Replies View Related

Android :: Can I Get ID From Created Drawable

May 26, 2009

I created a new Drawable with: Drawable dx = resources.getDrawable(R.drawable.mydaysminipic_ov); dx.setColorFilter(0xff00ff00, Mode.SRC_ATOP);

and for: updateViews.setImageViewResource(predefinedDraw, --> ID from dx); I need the ID from it... but how to get?

Or any other Idea how to assign my Drawable dx to the above predefinedDraw?

View 2 Replies View Related

Android :: Add TouchListener To Drawable?

Jan 9, 2010

I want to make a Drawable touchable for a component I am creating, does anyone know how to do that? code...

View 2 Replies View Related

Android :: Converting Canvas To Drawable?

Sep 5, 2009

Is it possible to convert a Canvas to Drawable?I may be really off in my solution, so if you have a better suggestion, please do tell me. This is what I'm trying to do.I'm trying to create a custom RadioButton. to set different states of the radio button, I need to use this parameter and one of the parameter to addState is Drawable. I know I can easily provide an image file and use it as a Drawable, but I want to do some image manipulation to the image before using it.There is a tutorial in ApiDemo called AlphaBitmap. It uses the onDraw method of a View to change a PNG file to full red and draw something with a gradient. So I customized it to shade an icon with gradient. So the problem now is that this is a View, and the View works perfectly fine if I add this View to the main view. But i want to convert this View to Drawable so I can use it as one of the parameter in addState. What I really want to achieve is to have different colour shades for different state of the RadioButton without providing different images to do so.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved