Android Question B4XTable inside AsViewPager, table not shown.

Jorge M A

Well-Known Member
Licensed User
Hello everyone!

I am returning to pick up where I left off, because of other priorities. Getting to know B4XPAGES and other news for me.
So Taking Erel´s example, about the B4X Editable Table, and the nice @Alexander Stolte s AS ViewPager, I can't get the table to appear in B4A, testing on different devices and versions, while in B4J the behavior is as expected.
I've tried some alternatives with no luck, and I still don't know what I might be doing wrong or failing to do.

I would appreciate your help to understand this issue.

Using B4J 9.80 x64, B4A 11.80 x64.

libraries in use:

1657157565185.png
1657157598980.png


This is what I get in B4J
1657157654474.png


and this in B4A
1657157678399.png


Attached zip file with projects (B4I is ignored)

Thank you very much!

jma
 

Attachments

  • ASVP&B4XTableAndForms.zip
    197 KB · Views: 87

Alexander Stolte

Expert
Licensed User
Longtime User
You do this:
B4X:
    Dim tmpnl As B4XView = xui.CreatePanel("")
    tmpnl.LoadLayout("1")
'    tmpnl.BringToFront
    tmpnl.Color = xui.Color_ARGB(255,Rnd(1,255),Rnd(1,255),Rnd(1,255))
    tmpnl.SetLayoutAnimated(0,0,0,VPager.Base.Width,VPager.Base.Height)
    VPager.AddPage(tmpnl,"")
but on B4A you need to set the panel width and height, before you load the layout to this panel.

Solution:
B4X:
Dim tmpnl As B4XView = xui.CreatePanel("")
tmpnl.SetLayoutAnimated(0,0,0,VPager.Base.Width,VPager.Base.Height)
tmpnl.LoadLayout("1")
 
Last edited:
Upvote 1
Top