Android Gallery Performance Best Practice
I was thinking about starting a gallery app with the ability to search/filter images based on tags. My question:
I want to update the images often so... should I host the images on a webserver and host a XML file the app can call with image paths thumbnail path and tags name. That way I can load the thumbs to save bandwidth until they click and th开发者_如何学编程en load the main image.
XML Below:
<image>
<title>My Family</title>
<tags>family,vacation,grandpa</tags>
<thumb>myimage_thm.jpg</thumb>
<full_path>myimage.jpg</full_path>
</image>
And then use the built in android gallery?
Does this sound like the most efficient way start my project? Any thoughts would be much appreciated.
Use json instead of xml format to transfer your updates.
Implement REST interface to post updates to your server.
If you are going to download these thumbnails use Async threads to download these images. Take a look at droidfu (http://brainflush.wordpress.com/2009/11/23/droid-fu-part-2-webimageview-and-webgalleryadapter/)
Also look at the app photostream by romain guy. This should give you a good idea on how to implement your gallery app.
精彩评论