Android Question XUI controls without using designer

abilio486software

Active Member
Licensed User
My interface is very dynamic and I pretend to know how to use XUI controls without using the designer, just adding to the activity the controls.
It is possible?
 

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
Not for many (if any) of them. Just create a designer view with only the control (remove the Autoscale All command) and load the layout with the control you need.

If you need a reference to the control you can use code such as
B4X:
ParentContainer.LoadLayout("viewlayout.bal")
Dim NewXUICtrl as B4XView = ParentContainer.Getview(0)
' or if this is one of many controls then "ParentContainer.GetView(ParentContainer.NumberOfViews - 1)
@Erel has an example of this somewhere on the forum but I can't find it at the moment.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
has an example of this somewhere on the forum but I can't find it at the moment
Many thanks!!
I think Jeff is referring to this link:
 
Upvote 0
Top