Android Question Grid with xCustomListView ?

Hello everyone!

I've been searching through the forum for a clean example of a grid using the xCustomListView module but i just can't seem to find one.

I've seen the example where there is a single layout with multiple columns but that doesn't seem correct to me beacuse you have to have multiple layouts for 3, 4 and 5 columns and if a small change has to be made to a cell, you have to go through each cell and through each layout file and make the correction.

Basically what I'm looking for is to create a single layout that represent the cell and just add it to the cusotmlist without any other complications.

I also looked at the UlitameListView library but I'm not sure how stable it is and the approach didn't look very clean aswell.

The simplest way i've managed to approach this problem is to use another horizontal xCustomListView as my row and i put my items into it. But that also doesn't seam clean to me.

Thanks for your time!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Grid can mean many things, it will be easier to help if you post a mock-up layout.

If you mean a table then check:
And:
 
Upvote 0
Grid can mean many things, it will be easier to help if you post a mock-up layout.

If you mean a table then check:
And:
Something like that. But I guess this can also be achieved with the two libraries you specified ?
 

Attachments

  • tables_page.png
    tables_page.png
    188.1 KB · Views: 234
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
I would have used xCLV for this layout. Nothing special is needed to create it and you can add new types of items without modifying other layouts.

Create one or more layouts with the panels (row layout). You can use this designer script: https://www.b4x.com/android/forum/threads/b4x-visual-designer-spreading-controls.109389/#content

Create more layouts for the cells. You will then load the row layout and then the cell layouts.
Thanks!

Also is there any way I can access the Java Source for the xCustomListView Library?

I would like to make modifications to it so that in the designer there is another row for ColumnCount and basically when you call CustomList.Add() it adds to the current column instead of creating a new row every time.

I want to do this so I can avoid creating a layout with multiple columns, because I'm using an architecture which makes it complicated for me to have another layout for my row as you explained.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Also is there any way I can access the Java Source for the xCustomListView Library?
It is of course written in B4X. Like almost all other libraries.

I would like to make modifications to it so that in the designer there is another row for ColumnCount and basically when you call CustomList.Add() it adds to the current column instead of creating a new row every time.
Sounds like a big mistake.
You can easily implement it in your code.
 
Upvote 0
Top