qera hile
qera hile

Reputation: 112

How to prevent a drawable from becoming blurry?

When i copy-paste an image to the drawable file, i get one image with the original resolution. When i use the New--ImageAset way i get a lot of images for different screen densities but they are all blurry, even xxhdpi! How can i have the different densities inages without this problem? Im surprise i didnt noticed it before!

I read this but it hasnt helped me Android ImageView blurry? http://developer.android.com/guide/practices/screens_support.html

Any advice am i doing it wrong?

EDIT

I tried the AndroidAssetStudio but it still happens

Before enter image description here

After (xxhdpi) enter image description here

Cant i get it to be the ldpi and then make it scale up from it or something?

Upvotes: 1

Views: 8959

Answers (2)

Ahsan Hayat
Ahsan Hayat

Reputation: 131

There is a plugin exactly made for the same purpose. You can use that plugin to make different sizes of the same image. You have to copy/paste a single image in drawable folder. Then right click drawable folder and select NEW>Batch_Drawable_Import. Select the size for your image and it will itself make the other sized images for you.

Upvotes: 0

Marcus
Marcus

Reputation: 6717

You can create your image in different resolutions using Android Assets Studio. Then, copy paste the image to the respective folder. This will give you a proper image, without blur.

Upvotes: 1

Related Questions