I have put 4 image for each folder mdpi,ldpi,hdpi,xdpi in the ratio of 3:4:6:8.
Now I need to make any changes in androidmanifieast.xml file or application automatic select from which folder he need to pick up proper image according to screen resolution of device?
Thank You.
Now I need to make any changes in androidmanifieast.xml
you have to add this code in manifest.xml file
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"/>
application automatically pick up proper image according to screen resolution..
Related
I'm using the Layout Variants tool to create differents sizes for my layout.
the problem is that when i pick any large Device to preview my layout..
it keeps using the normal size
how can i force it to pick the right layout for the screen ?
by the way i already did the AndroidManifest support screens
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
but still having problems!
also my app icon looks so small too in my phone!
any idea?
Android emulator uses wrong layout resources ,i'm having a two layout hdpi, mdpi but in emulator get a wrong one why ....
I added in my manifest file ,
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:largeScreens="true"
android:normalScreens="true"
/>
In andorid drawable resources usage is depends on ppi.
Please refer the link http://developer.vodafone.com/image-and-graphics-tips-android/
You have to change the emulator ppi values and try your's. Thanks...
I look over some guide and tutorial but my problem still exists.
I develop this application using small image to create button, text and background and i put it in res/drawable-ldpi directory. Then i see on web that i have to make images with this proportion:
3:4:6. So if my images were small, to create them for medium screen size, i have to take dimension of small image and multiple for 4/3, and for large screen multiple for 6/3=2.
I see these here: Providing Resource.
Now when i create just some images for normal screen ( medium ) i launch emulator with screen density 160 or 200, but the image still remain that used in ldpi.
What can i do?
Can you explain me well what is the problem with these multiple screen and how to solve this?
This is a part of my android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="spazio.digitale.com" android:versionCode="1"
android:versionName="1.0" android:installLocation="auto"
android:screenOrientation="portrait"
>
<uses-sdk android:minSdkVersion="7" android:maxSdkVersion="11" />
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens android:normalScreens="true"
android:smallScreens="true" android:largeScreens="true"
android:anyDensity="true" />
use to pixels scale to design..
put this in manifest
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"
/>
For button, create images using 9-patch tool.
With bitmaps, the rule of thumb is to start with the highest density first, and then scale it down, because it's always easier to scale down bitmaps than to scale them up.
Also, you seem to be confusing screen density with screen size. Do not worry about the screen size for now (unless you have one background image that takes the entire screen size, which I doubt). And no, the ratio you mentioned has nothing to do with screen sizes, that only applies to screen densities. Fix the density issue first and foremost. Then, once that's fixed, you can focus on making sure the layout fits the size.
And don't even bother with ldpi, that's only 0.2% of the market of handsets. You're just wasting your time optimizing for that density.
I have developed an Android game using a Canvas. When I port the game on devices with different resolutions, the graphics, such as ImageButtons, get scaled according to resolution, but the background images do not scale appropriately.
I have written these lines in manifest file :
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"
/>
Why don't the background images scale correctly?
You can use ImageView.ScaleType
ImageView.ScaleType="CENTER_CROP"
Try to use an ImageView that will most likely scale automatically. At least it did in my program. It's worth a try.
I'm displaying a 1500x1000 px sized image in an Android WebView, but it displays it in poor quality. I read somewhere that quality can be preserved using and displaying many smaller parts from the original image, but that seems like too much work and not sure how it really could work.
I added
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true" />
and created a drawable-hdpi folder and put the image in there, with no change.
Has anyone done this succesfully or any suggestions?