Reputation: 31
How to use single drawable folder for all images by which apk size can be reduced ,I have seen many posts but every post says that its necessary to use all folders(hdpi,ldpi...etc).Is their any way to use single folder and get good quality images
Upvotes: 1
Views: 461
Reputation: 2762
Put the Image in Drawable Folder. It will use the Same image for All Devices. But Quality will vary for Devices to device. The image may get Blur as Big Screen increase the width and height of images.
Upvotes: 0
Reputation: 17131
You can use the 9 patch.
Useful links :
http://radleymarx.com/blog/simple-guide-to-9-patch/
http://developer.android.com/intl/pt-br/tools/help/draw9patch.html
http://developer.android.com/intl/pt-br/guide/topics/graphics/2d-graphics.html#nine-patch
Upvotes: 0
Reputation: 3436
Leave Eclips and Start with Android Studio will provide this facility.
Upvotes: 0
Reputation: 33
if you want to reduce apk size then i will suggest you to place images on server and call them using RestApi. after getting all the json data by calling RestApi you will get the imageurl. here is the link Picaso Image Loader you can load image on ImageView from url by using Picaso Image Loader. all the details are mentioned in link.
Upvotes: 0
Reputation: 165
Different drawable folders are used for a purpose, i.e when you want your app to be compatible across number of devices. There will not be any issue even when you use a single folder for all images, but when u test or run the app across number of devices you can see that sometimes the image is big and sometimes small.
So its always advisable to create multiple folder so that you'll get the perfect image for that resolution device.
Upvotes: 3
Reputation: 344
Upvotes: 0