Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do create this type of Listview in Android?

I want to design this type of layout in android. How can i connect each list items with a gray color line like below image. I think there a listview that contains the list items but i don't know about that how can i connect these list items through this gray line?

enter image description here

like image 598
Parvindra Singh Avatar asked Jul 31 '15 13:07

Parvindra Singh


1 Answers

You do not need to connect anything. You need to make it look connected.

Simplest approach would be to ensure no padding/margin between rows exists (if you want to separate rows as on the picture you need to make this separation part of your row layout, so it, again, looks separated but you are separating them yourself and not use any listview/recycler view dividers nor decorators). Then when you use image that reaches top and/or bottom of the row and if in one row this image reaches bottom and then next one starts from top, then it looks connected

Other approach would be (if you got limited number of rows) to consider using ScrollView, not the list. I suspect this may be the case on your picture based on how this bigger dot between tag3 and tag4 is placed. This would allow you to i.e. animate movement of that big dot which otherwise would be much more trickier with listview.

like image 123
Marcin Orlowski Avatar answered Oct 06 '22 08:10

Marcin Orlowski