• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Imgview sliding selector

JamTheMan

Well-Known Member
Hi all

I am a happy Android developer working on a project, where I have a design idea that I cannot seem to find the answer to. I know this is possible, as I have seen similar in many apps, but I cannot find the answer on how to make it - might just be because I don't know what actually to search for. But I have made a very fast sketch of what I want to accomplish:

slider_thingy_example.png


I have the map and everything else figured out, I think :-D

But I cannot figure out how to make that kind of selector. All I want is to be able to load a series of Views (from their own layout file) and show them like that, next to each other. The currently selected one should be larger than the others, and the user should be able to slide right and left to select a given item. And then I need to know which one is currently selected.

Any hints or examples?
What am I looking for?
 
The closest bet I have got so far is the Gallery, which supports most of what I want. But i just can't seem to get the selected (centered) item to be larger than the other. Any help out there?
 
Well the gallery will force you into all sorts of constraints that you may not want (like forcing the image size on you).

However, you should be able to resize and image pretty easily using either an Amination object or just setting the layout_width anf layout_height and calling requestLayout(); on the view.

Another setup to try would be some kind of ScrollView
 
Back
Top Bottom