B4A Library [Class] Flexible Table

Sergey_New

Well-Known Member
Licensed User
Longtime User
Pay attention to the background when hiding the keyboard in the above example.
If the table is visible, then the background color (for about 0.5 seconds) is white, if invisible, then the background color corresponds to the color of the activity. A table with or without data does not matter.
 

klaus

Expert
Licensed User
Longtime User
I see too a white screen when clicking on OK in the Input dialog.
But the behaviour is exactly the same with the table hidden or visible.
I made a layout without the Table object and the behaviour is the same.
To me it looks like a problem during the transition between the two dialogs.
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Yes, there is blinking on the "OK" button, but much shorter. On the "Cancel" button - as I wrote above, it depends on the presence of the table.
 

klaus

Expert
Licensed User
Longtime User
Sorry, but on my device i don't see any difference, i cannot reproduce it.
I asked my wife if she sees any difference, the answer is no.
I tested it also on my tablet Samsung T2, no difference !?

Therefore, sorry, but don't know how i could help.
Which version of Android do you use?
Do you see also in Release mode?
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Checked on a low (HTC One X - 4.2.2 - API 17) emulator in debug and release modes, as my application works from this version.
Tested on Samsung Galaxy S7 (Android versions 6 and 8), this effect has almost disappeared.
Thanks for checking.
 

padvou

Active Member
Licensed User
Longtime User
It would be great if the table as shown could be send via email. Is this possible?
 

stu14t

Active Member
Licensed User
Longtime User
Has anyone used Statemanager with the Flexible Table? Just looking for best way to implement this.
 

stu14t

Active Member
Licensed User
Longtime User
After thinking about it I've just saved the table to CSV outside of StateManager and then re-loaded it once the StateManager has finished re-drawing the views.
 

yuhaowang

Member
I ran Table4.RefreshTable, and as a result, all the data in the previous rows were overwritten with the data in the last row of Table4. What are the reasons and how to solve them?
 

Sergey_New

Well-Known Member
Licensed User
Longtime User
Tell me if it is possible to write the following text into a table cell:
B4X:
Dim cs As CSBuilder
cs.Initialize.Color (Colors.Red) .Typeface (Typeface.FONTAWESOME) .Append (Chr (0xF221)). Color (Colors.Black) .Append (" ") .Append ("Name"). PopAll
 

klaus

Expert
Licensed User
Longtime User
I ran Table4.RefreshTable, and as a result, all the data in the previous rows were overwritten with the data in the last row of Table4. What are the reasons and how to solve them?
Sorry, I missed your post.
Without seeing your code, what exactly you have done and how it is impossible to give a concrete advice.
 

klaus

Expert
Licensed User
Longtime User
Tell me if it is possible to write the following text into a table cell:
I don't know, I have never tested it.
The cells are Labels.
To fill a row you need to use the AddRow(Values() As String) method.
It expects an Array of strings.
I don't know if CSBuilder.ToString works, try it and you will see.
 

Kanne

Member
Licensed User
Longtime User
Is there a way to bold a typeface for a single row or even a single cell?
you can do that via the callback function which was extended by Klaus for me.
Wwithin the callback function you can change every cell as you like - be aware that it might change the column width and it is not possible to rearrange that by a call from within the callback function (this would trigger a repaint of the table and so an endless-loop)

e.g. italic to every 2nd row:
Sub Table1_ShowRow(Row As Int, lbls() As Label)
    If Row Mod 2 = 0 Then
    For i = 0 To lbls.Length -1
        lbls(i).Typeface = Typeface.CreateNew(Main.myFont, Typeface.STYLE_ITALIC)
    Next
    End If
End Sub

Attached an example of my app: coloring every cell depending on different values, played games etc.
 

Attachments

  • Screenshot_20210502_192340.jpg
    129.3 KB · Views: 184
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…