4

I want to show a large bitmap in an ImageView (144dp), but I got bad quality. The bitmap is stored in my drawable resources.

Can I show the bitmap in full quality?

Xml layout:

<ImageView
    android:layout_width="144dp"
    android:layout_height="144dp"
    android:src="@drawable/ic_add"/>

What I want:

http://tinypic.com/r/2jv72w/8

http://tinypic.com/r/2r7mtz4/8

What I have:

http://tinypic.com/r/osh9qq/8

Look at the big images who show that the list is empty.

User
  • 305
  • 1
  • 3
  • 15

1 Answers1

8

replace your ic_add file in the following locations with a better bitmap version approximately sized to what 144dp represents for the android density buckets as follows:

folder (density buckets)       image dimensions
res/drawable-mdpi              144x144 px
res/drawable-hdpi              216x216 px
res/drawable-xhdpi             288x288 px
res/drawable-xxhdpi            432x432 px
res/drawable-xxxhdpi           576x576 px
petey
  • 16,914
  • 6
  • 65
  • 97
  • But how can I scale up the image? I created it in Android Studio assest generator. – User Dec 24 '14 at 20:43
  • create a bitmap for xxxhdpi 576x576 dimension and resize it down in your fav. image editor accordingly – petey Dec 24 '14 at 20:47