Android Question Panel1 should be initialized?

andredamen

Active Member
Licensed User
Longtime User
In Globals: Private Panel1 As Panel

Panel1 is made in designer so initializing is not necessary. I know

Panel1.Initialize("Panel1")
clvNummers.Initialize(Me, "clvNummers")
Log(clvNummers.IsInitialized)
Log(Panel1.IsInitialized)
Panel1.AddView(clvNummers.AsView, 0, 0, Panel1.Width, Panel1.Height)

with or without the line Panel1.Initialize("Panel1") both logs give TRUE

The line Panel1.addview.... gives: java.lang.RuntimeException: Object should first be initialized (B4XView).

What did I do wrong?
 

stevel05

Expert
Licensed User
Longtime User
CustomListView is a B4x custom view and not a standard Android view. There is not a simple way to add B4x custom views in code, Add it to Panel1 in the designer and remove Panel1.initialize, clvNummers.Initialize and Panel1.addview.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…