Android Tutorial [B4X] B4XTable - Adding custom navigation buttons

Status
Not open for further replies.
Depends on B4XTable v1.01+

SS-2019-02-06_15.24.42.png


It is very simple to add your own navigation features.

Code:
B4X:
Sub btnNext_Click
   B4XTable1.CurrentPage = B4XTable1.CurrentPage + 1
End Sub

Sub btnPrev_Click
   B4XTable1.CurrentPage = B4XTable1.CurrentPage - 1
End Sub

Sub B4XTable1_DataUpdated
   btnNext.Enabled = B4XTable1.lblNext.Tag
   btnPrev.Enabled = B4XTable1.lblBack.Tag
End Sub
When the data is updated we check the state of lblNext and lblBack. The state is stored in the tag property.

Related example with swipe gestures: https://www.b4x.com/android/forum/threads/tablepanel-adds-swipe-navigation-to-b4xtable.104628/
 

Attachments

  • B4XTable With Navigation Buttons.zip
    59.9 KB · Views: 1,264
Last edited:

incendio

Well-Known Member
Licensed User
Longtime User
Error :
1. File not found b4xinputtemplate.bal
2. Unknown type b4xtablecolumn

Library b4xTable 1.02
 

Gabino A. de la Gala

Well-Known Member
Licensed User
Longtime User
Are there any way to scroll between pages by gestures?

I am thinking to use a scroll bar or something similar.

Thanks.
 

Alexis Martial

Member
Licensed User
You can make all columns frozen and use GestureRecognizer to detect swipes.

Hi Erel,

I tried above suggestion, creating a GestureRecognizer.
Issue is the GestureRecognizer does not get the event when I associate him with B4XTable.mBase, probably since each item in the table is in front.
And if I associate the GestureRecognizer to the parent Panel/Activity, he also got the event only if started from outside the B4XTable area.

Can give one more clue ? ;-)

Thanks in advance
 
Status
Not open for further replies.
Top