mudit
mudit

Reputation: 25534

How to create such layout for each row of Android Listview?(Tricky Layout :) )

please help me to create the following xml layout for the row of my listview

alt text

Here the Text is written in a textview and remaining 5 boxes are 5 different ImageView, and the Images should be clickable.

Main problem is how thetext comes over the images.

Upvotes: 2

Views: 388

Answers (2)

Reuben Scratton
Reuben Scratton

Reputation: 38707

As per Peter Knego's answer, RelativeLayout is what you want for overlapping Views, but I suspect you will find it hard to get the onClick events for images underneath the text.

You may need to do a custom layout class that extends RelativeLayout and draws your text manually from dispatchDraw().

Upvotes: 1

Peter Knego
Peter Knego

Reputation: 80340

Try using RelativeLayout.

Upvotes: 0

Related Questions