how to get a "google image search" like layout - android

i am trying to build a UI that is similar to that of the Google image search,
basically a bottomless grid of pictures that are dynamically fetched once the user scrolls down.
i cant use the choose image intent because the pictures are not on the users device.
my current thinking is using a grid-layout and adding more items each time the user scrolls all the way down, does something like this already exists?
or is the grid-layout design is the way to go?

You can use existing libraries that make use of GridView. Check out the following article.
Just in case this article disappear I will post links to mentioned libraries here:
https://github.com/etsy/AndroidStaggeredGrid
https://github.com/maurycyw/StaggeredGridView
There are probably more libraries out there.

Related

How to have an free flowing overlay structure in my android activity which is scrollable in every direction?

I am building an android app. I am new to this, I found out an interesting activity UI development, But I don't know how to describe that property properly in android terms-(I SINCERELY APOLOGIZE FOR THAT ).I am adding a video, Please consider it.Free Flowing multi-directional Smooth scrollable android overlay UI (Please turn on the subtitles on)
How to have that kind of UI overlay suppose I want to display a large image or file with multiple clickable buttons on it[I have already tried various Image loading libraries to load big size images and to make that Multidirectional scrollable].But that's not the exact thing which I want (like you can see the above mentioned reference).
So how can I execute that?
Thank you In advance for considering your time.

displaying images in android with zoom/pan/rotate etc functionality

So i got a lot of solutions online but none of them were simple and complete. First i tried using imageview and adding external libraries for zooming etc. but i couldn't find one which had all the functionality we see in a gallery app without being extremely slow. I read something about canvas though don't know what it is. I also found "zooming a view" in android official tutorial but it was just a single tap zoom. So which is the best solution (in terms of functionality and speed) for this: I want an activity to show just a single image such that the user can zoom/rotate/pan it as its gonna contain text that the user needs to be able to read. So basically just like a gallery app. Is it possible to call on the gallery app activity to display this image? Why doesnt android have better support to do this? What is the best way you would suggest.

Design of list view lazy loading images component

I have a scenario which I think is pretty common in Android applications. I know partial attempts of solving the issue were made, but until now I have not stumbled upon the full implementation. I intend to try to implement such component and open source it afterwards, but I need your help in its design.
So basically my case is the following: I have list view showing image loaded from the web and text per each row. I want to lazily load the images, placing default for each image and substituting it with the real one only when the image is downloaded. I also want to keep image cache avoiding the need to download the images multiple times in short period.
Up to now I have found several implementations that are partially working including:
Tom van Zummeren's implementation of similar component with several well known problems
Jeremy Wadsack's refinement of the concept, which is more or less working
Lazy drawables source forge project.
I also saw several stackoverflow questions regarding the problem: 1, 2, 3
However I have one more requirement which makes my task a bit more complex: I allow the user of my application to affiliate himself with some of the images. I want to load the new images associated to the user whenever the user navigates to the home screen. From it he should be able to go see his images, even before they have all been downloaded and in this case again default placeholders should be visible (Note the cross screen transition). Such use cases are:
An app listing user's youtube videos
An app for facebook - consider the images of friends
An app serving news that supports user's favorites etc
Note that I want to start fetching the new data related to the user on the home screen to provide better user experience. I will keep the user-related data stored locally forever.
The question
So my basic question is what approach should I use for the implementation of the image downloading? I know that the Android manuals say Service should be used only when I want to execute task even when application is not running. On the other side I will start the image downloading on the home screen and link the downloads to UI elements just when the user navigates to the new screen (Activity) - user-related list view and I do not know how to achieve that with AsyncTask (not that I have a very precise idea how to do it with Service either).
Any suggestion will be greatly appreciated, including links.
Universal Image Downloader is a good library which helps you to do image downloading in background with your settings.
It has so many features that you can implement at your own way.

What is the name of this control in android

May i know the name of the below placed image control, also please tell me how to implement similar control in my application.
This control appears, after long press on contact image.
It's called a Quick Actions Popup, and it's not default for the framework... you have to create it yourself.
Another SO question asks about it and the answers have several links to pages telling you how to do it (there's even a couple of code repositories you could download in there).
Good luck.
That is not a built-in control, but it's not difficult to roll your own.
All you need are some nicely crafted images, the outer part can be a LinearLayout, which contains another LinearLayout, which in turn contains 3 Buttons, and you are done with the UI of the control.
The rest of the implementation is to calculate the coordinates to place this control.

How to implement screenshots gallery like Google Play?

I'm wondering how to implement gallery of screenshots like Google Play (Android Market). If i use typical Gallery, the problem is the first item of gallery is at the center(it has big big space at the beginning and the same at the end). I tried some horizontal listview but it seem has problem with scrolling when i push my horizontal listview in another scrollview link. In Google Play, the "gallery" doesn't have space at the beginning.
Thanks in advance.
use a ViewPager. it's used extensively in Google's in-house apps and works quite well for horizontal paging. it's also a pretty excellent replacement for TabHost.
Gallery is actually deprecated in favor of ViewPager.
Actually i finished my project long ago and forgot close question. Using this Android: Create an image Viewer using ViewPager.
For future guests, you can see another training from Android Developer about ViewPager here:
Displaying Bitmaps in Your UI

Categories

Resources