Mal
Mal

Reputation: 27

Android clickable panel UI

I am currently working on an Android app, I have completed all the 'hard stuff', such as getting my database working, and so on. Now I need to make the UI look decent. I would like to make something that has a 'frame' layout that is clickable. You would click on a 'frame' to find out more information, a bit like the Amazon app. If anyone has any ideas, tutorials or good links, I would be very grateful. Thanks in advance.

Upvotes: 0

Views: 811

Answers (1)

Yoni Samlan
Yoni Samlan

Reputation: 38065

Take a look at Gallery. It's built in to Android and does what I think you're looking for (at least, it describes the Amazon app's UI; since FrameLayout has a very explicit meaning in Android that is not at all what you're talking about, I ignored that part).

EDIT: A screenshot would have been helpful but I think you're actually talking about a simple list-like view.

Oh. That's either a ListView, or more likely just a vertical LinearLayout inside a ScrollView. I can tell you what I'd do: Each item in the LinearLayout would have a background set, with a width of match_parent and a height of wrap_content, using a 9patch with the right-pointing arrow inside it. I'd also define an identical but blue-highlighted version of the image for the pressed state and use a state drawable XML to let it know which to use. Then I'd just bind an onClick listener for each item I wanted to fire off a click action on.

Upvotes: 1

Related Questions