I'm working on a android app that will display gemstones. Putting thumbnails in drawable-XXSIZE is not a problem, but how can I continue this with expansion files?
If I create folders such as: drawable-ldpi, drawable-mdpi etc. and put everything in a zip (I can only have 2 expansion files) will I be able to download only what I need? (I'm guessing no...)
So how can I make sure the tablet user will get big image for full screen such as 1920px (worst case scenario) and for mobile phone alot smaller.
What is the best approach for this kind of applications?
Should I just put it on my own server and make my own image management?
I would like to just put it in a bundle and the end user have an app that is as small as possible without loosing quality
You need to try sdp library for this
https://github.com/intuit/sdp
After this your problem is solved and also try vactor images so you do not need different image size in all folder like mdpi or ldpi or xxhdp ,need to store single vactor image in drawable folder.
There is no solution to this. I just have to build functionality. Previous answer it has nothing to do with my question
Related
I'm new in android and I'm working on a project where i'm using more than 50 images which includes icons and background images. As per android doc, for responsive UI I have to store each image in 4 format i.e. hdpi, mdpi, xdpi and xxdpi. I followed the same but after that I noticed that there are 200 images in my drawable folder(50*4). So my question is whether Im doing right thing or not? because it increases my project size.
whether Im doing right thing?
Absolutely not if you store this 200 images inside your app than your app size is too much high and no one can download the app also there is some performance issue so this is not the right thing at all
Answer 1 -
Best way is to use fontawesome these will generate image from your ttf file dynamically you just need font.ttf file but disadvantages in this approach is there is less number of font/images available for free version if you want more number of images than you have to pay you can refer this
Answer 2 -
Go for Cloud storage means you need to store your image in one of cloud storage than download from cloud they provide API for upload as well as download images refer this But ill suggest you to go for cloudinary.com i have used this and easy to implement API , API for nearly all Languages and Its Free Free Free .......
Best of luck
You have to try the vector drawable images. It contains the code path, so automatically it will expend to all size.
for more info
https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html
https://developer.android.com/studio/write/vector-asset-studio.html
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
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.
you can use drawable in xml such as shape. It's only use drawable folder.
If you want use only one folder, then you can chose the xhdpi or xxhdpi folder. Zoom in bitmap is better than the zoom out bitmap when it display on Android device.
.9.png is recommanded. It can use only in drawable folder.
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.
Leave Eclips and Start with Android Studio will provide this facility.
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
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.
I am creating an app that uses more than two hundred images. To display images, lmageView is used. My question is- Is it necessary to put images in drawable-hdpi,drawable-mdpi,drawable-xhdpi,drawable-xxhdpi. If I put the images in these four folders, does my app size increases?
Please help me. Thanks in advance.
Well I guess if your image set will not change in the future maybe that's the best place to store them. Your app size will certainly increase, however, if that's a concern you can store them using any cloud service like parse.com or firebase, so you can retrieve them later using a library like picasso
You don't have to put pictures in all folders. There are folders for different image resolutions. You can use a single folder called drawable or just use drawable-mdpi. The app size increase with multiple image versions. There are some disadvantages when you use only one folder.
If you have big resolution images inside your folder: For a presentation, small screen devices have to minimize the image. This costs hardware ressources. If it costs to much ressources, your app will crash.
If you have small resolution images inside your folder: For a presentation, big screen devices have to upscale the image. This will result in bad image quality.
I am beginner in Android development. I need to show 400+ images in my android app. Right now I am putting all of them in my drawable folder, but this doesn't seem good, as my apk becomes too large in size. What should I do? Can I play with images' resolution and all? Please help.
best solution will be to put them in web and then displaying it through lazy list, But if thats not an option then only thing you can do is to compress your image to a extent it is acceptable, that will check you problem of large apk size.
try PNGOUT , a great tool for compressing images.
Put them all in a extension-obb-File:
http://developer.android.com/google/play/expansion-files.html
So I handled it with videos.
i'm writing a simple application. i need to handle around 100 images having size dimension 1000*740. images are fixed no need to change. user will see this images like gallery view.
Problem
1.Large number of Images increases .apk filesize .It crosses memory limit(Given by Android market).
2.I placed these images in Drawable folder.Is there any other way to keep this images?
Any Idea?
YOu can host them on a separate site, but you do not have to download them every time. You can download them to an external directory (sd card) and just check if you've got everything you want when starting the app: If you do, you obviously don't have to re-download the shots again.
Is there a reason your images are of that size? If you compress them a bit you should be able to fit a photo in less then half an MB, and I think that the limit is 50mb on the market: You might be able to just squeeze it in.
Upload all the images to a link. Do parsing by using that link.
That's a pretty tough dilemma. Perhaps the user can download the images instead. You could use flickr to host the images.
I would suggest hosting them somewhere and download as "citizen conn" suggested.
Another possibility would be to separate in different sets and have different apk with those (maybe some of them would only have a content provider with some of those pictures). But that's kind of ugly...
Other than that, I don't think there is any way to get around the limit from Android market...