I would like to ask advise if displaying pdf inside gridview instead of image is possible. I have tried to display list of websites in gridview using webview. Now, I want to make it a list of pdf files inside gridview. Normally same with if you open your folder in your linux laptop and have the thumbnails of your pdf, things like that. I want to achieve that in my application. I would really appreciate any of your advice, no codes needed cause i will handle it my self. I just want to have some theories. thanks and HAPPY NEW YEAR GUYS
I think what you're going to have to is convert the pdf's into a bitmap first, then load into an ImageView, check out this post and also look into other pdf rendering libraries for Android.
Related
I'm working on a simple gallery app. I'm wondering what's the best way to create and dsiplay thumbnails. I was thinking about using ThumbnailUtils, making thumbnail for new pictures and then store it in app data storage as I assume that doing it every time when user displays all images isn't efficient. Though I'm not so sure what's better memory-wise. To load an image into ImageView which is part of RecyclerView item I'm using Glide. I don't know if .thumbnail(...) does what I want so I think I need to create thumbnails myself. Could someone show me the correct way to do this? I want the app to load quickly so it's obvious I can't load full resolution images to recycler.
The best way for your result is to use the GridLayout. I wrote an answer yesterday how to achieve that Widget. Take a look. Cheers!
I am developing one application for one real state website. I have to display dynamic content from web I mean website display lots of images and description about the property. i need to populate images and their description in list view similar to flipkart android app do. I don't know how to proceed as of now i have thought i can download all images to sd card and get the text from json and then populate both in custom list. but i feel this is not a good approach as images grows in no it would take memory. Please give me some pointer how i should proceed to get better results.
Thanks in advance. Any help will appreciated.
You can simply use custom listview with image and text.
Get image and text both from web.
You can also refer to this link.
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 then 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.
Hi :) I'm trying to write an android application that downloads a bunch of images and afterwads displays them in a gallery. I managed to download the images (i did download them do the data/data/project directory - not sure if that's right) but now i can't access them (i tried using the setImageURI method of the imageView to display the image after I've created an Uri instance via Uri.Builder().appendPath("data/data/project/file.jpg").build() but it was to no avail). I'm new to android developing so any help will be greatly appreciated. Thanks!
I started writing up an example, but decided that it was a waste of time since the net is littered with better examples then I could create.
At a high level, you'll need to do this:
Get 1..n File objects
Load Bitmaps from these objects using BitmapFactory
Load these decoded bitmaps into a ImageView
The typical mechanism for viewing a set of resources like this is the Adapter pattern. As I mentioned, there is a good example here which also encompasses the use of AsyncTask and some other patterns typical of Android programming which you should become familiar with. Review that and see if you have further questions.
Try:
Uri uri = Uri.parse("file:///data/data/project/file.jpg");
image.setImageURI(uri);
I'm trying to build a gallery where the images within will be pulled from the images URL from a website. i.e. Instead of doing R.drawable.xxxx.jpg, you use a url to represent the image.
Is this possible? If so, can you show me an example in code?
Thanks
this might be old post, but hey this library from github might be helpful
Android Image Loader
Also, on Application class, set the option to MaxPriority for better outcome.
Cheers,
Hope this helps...