Table with variable column width per row (similar to UICollectionView for iOS) Table with variable column width per row (similar to UICollectionView for iOS) android android

Table with variable column width per row (similar to UICollectionView for iOS)


If you can set the cells to a predefined width, you should check out TwoWayGridView.

Otherwise, what you are looking for is in the AOSP's experimental branch and it's called StaggeredGridView.They have started the implementation but it's quite young and unprepared, though it may give you a hint as to where to start.

Generally, there are different approaches to this, and from my experience you may end up in having to write a good robust view recycler and re-user yourself, to be able to rely on existing API and widgets, where you will only have to calculate the width of the scroll and lay the views as they detach or need to be attached to your containers upon scrolling events.


I think the StaggeredGridView or QuiltView libraries will help you solve your issue. Using these libraries, we can arrange the images according to the width and height

If you are using quilt view, you can arrage it in different styles by changing the ScaleType, etc.

I haven't tried the TwoWayGridView but is worth trying. I hope this helps.. :)


I am not sure, but you can find the Solution for your issue here.

I think Bucket List Adapter is the Solution of your question.Please try with implementing it and let me know.

Feel free to comments. Enjoy Coding. :)

UPDATED

You Can also do like as you have said. Just create Dynamic TableLayout while User scrolling from down to up. So it will not take much Memory and will also display the data based on your custom view. In such way you will have Scroll will all the cell and also have solve the memory issue.