I need to show a thumbnail of multiple users like in gmail does when there is multiple people in a thread.
The sample is as follows:
I'm looking at creating the first image in the listview.
Image Source: Gmail screenshot in Play store.
Wonder if this may help :
Render Two images in ImageView in Android?
http://androidattop.blogspot.in/2012/06/merge-multiple-images-into-one-image-in.html
Not sure if they can be really helpful, but something close to what your trying to achieve. You could probably even create a custom ImageView and use it instead of the standard ImageView
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 working on an Android app where, once a user clicks a login button, the app launches an AsyncTask to verify account details with a remote server. That part works fine by itself and doesn't make my app slow. However, when you click the login button, it launches a second activity where I have 4 ImageViews. When I added that part of the app, it became significantly slower (from less than a second to about 5 seconds loading time). I load the images into the ImageView from the XML layout file directly, so I'm not sure what I'm doing wrong.
My question is that do ImageViews make your app slow, and if so, how do you optimize their performance?
I was working my own app when I actually experienced this too. The reason is because if the files are to big they take a while to load into memory and set as the Image View. There is two ways you could really sort it out.
1: Get a smaller version of the picture. Smaller pictures come up faster and aren't prone to an OutOfMemory exception which kills the app :(.
2: A better way is to use the Picasso api. I used this APIs to add images in list views, expandable list view with pictures in them. The app was fast and fluid :)
Picasso's api would be your best bet ant it is easy to implement.
Edit:
Here is the link to the site to get the APIs :)
Picasso
The only way I could figure this out is to create an image in photoshop that has all the buttons laid out where you want them on top of the image. Interpret it into your app and put regular buttons over top of the imagebutton pictures that you placed onto your background image. Set the size accordingly to your images of your buttons and then set the background of each button to #null so they aren't seen. Now trying to figure out how to interpret this into orientation view even though I don't think I'll be using orientationview. OH AND CHANGED THE EXTENSION TO A GIF TO SAVE ON DATA RATHER THEN PNG.
Hope this helps I'm sort of new at coding on android as I have lots of experience with HTML .
Cheers
THANKS FOR THE DOWN LIKE I WAS SORT OF NEW AT THE TIME OF NOT KNOW OTHER WAYS TO SET THIS... THANKS THOUGH, MORONS
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.
I have an android app which can send screen shots to share on Facebook. What I want is adding some stuffs like my app logo/icon on image and save that as a single image and share that on Facebook. (something like what heel climb racing does).
How can I combine Images? A sample code or tutorial would be grateful.
You can use the Canvas class to work with images.
Check this SO question for more details: combining two png files in android
I want to implement functionality same like in Facebook album viz. first it show blur image then clear version of that with swipe effect but I am not getting any idea from where to start from.
EDIT: I will be getting these images from webserver.
Actually what happens is:
Facebook show its thumbnail image(which is already downloaded) if the large image is not loaded. So it is not intentionally blurred.
and downloads the original image in background. and then sets the large image to that ImageView.
Numerous examples are available to show Gallery in Android.
afaik the "blurred photo" displaying in Facebook app is not actually an android feature, but more of how the embedded WebView handles images. Facebook App is basically just an embedded webview that hopes to look and feel like a native android app.
For the swiping gesture to view the next photo, you can use this.
Try making a custom class extending Android Gallery
And then try applying a blur effete on both Left and Right imageviews.