Android Question Questions about B4XTable (RTL orientation and having custom panels within the table)

MegatenFreak

Active Member
Licensed User
Hello everyone.
I'm writing an Android version of a desktop app I wrote. Unfortunately, the B4J code hasn't used B4XTable, just the default TableView. Learning that in B4A there is no TableView view like in B4J, I came to the conclusion that I must use B4XTable, hence the following issues:

1. My app, tables, and data are all in Farsi (right to left). In B4J, I easily set the TableView's orientation using "setNodeOrientation" on it as a JavaObject. That doesn't work on B4XTable's mBase view. Does B4XTable (being a custom view) support RTL layout? (so that columns are added and read right to left instead of the default way)?

2. To allow different operations on every row's data, I have buttons (labels with a click event) packed into a pane and added as a single column at the end of each row (check the screenshot please). Is there a way to make that happen in B4XTable? If not, are there any alternative methods or libraries?
Thanks a lot in advance. A screenshot of a sample table of such kind from the B4J app is attached.
 

Attachments

  • Untitled.png
    Untitled.png
    25 KB · Views: 29

Erel

Administrator
Staff member
Licensed User
1. Setting the labels alignment: https://www.b4x.com/android/forum/threads/how-to-set-text-alignment-in-b4xtable.103870/post-651285
Make sure to add:
B4X:
B4XTable1.MaximumRowsPerPage = 20
B4XTable1.BuildLayoutsCache(B4XTable1.MaximumRowsPerPage)
You can add the columns in any order you like and you can control the horizontal scrolling position.

2. There are many examples of B4XTable with custom views. Here is one: https://www.b4x.com/android/forum/threads/b4x-b4xtable-with-custom-cells-layout.102352/#content
 
Upvote 0
Top