I want to implement a list in Android that contains some customized views. My problem is that I want the the views will be put one after the other with a little overlap between them. like in the following schema:
I also want to control this overlap in such a way that when the user clicks on one of the items, they will move apart from each other.
I tried to extend ListView but it seems to be very obscured, any suggestions?
Edit: This can be more clear:
I did it by setting the divider height to -50dp. this is exactly what I want to achieve, but somehow it doesn't reflect on my app.
This can probably be achieved by using the
Camera.setTranslate
function. See Android: Vertical ListView with overlaped rows and Android: vertical 3d listview for similar questions (with solutions)I managed to achieve this by using scroll view with a single relative layout as a child. I then dynamically place the views by defining a rule and margin:
Later, you can control the positioning of the sub-views by changing their y value (for example: if you want to add animation).
This is the final result: