Android Question how to initialize XUI views

saeed10051

Active Member
Licensed User
Longtime User
I am trying to load Swiftbutton at run time similar to a normal button. There i am required to initialize my swiftbutton but there are two parameters that need to be specified when initializing swiftbutton i.e. callback as object and event name as string. Is there a working example of loading xui controls at runtime.
 
Thanks LucaMs, i have used the example code over there which was originally for switch and replaced if for Swiftbutton. It is loading, however i am unable to set the button text as there is not text property shown in the swiftbutton1 property list. I have tried swiftbutton1.mbase.text but it is giving me following error
java.lang.RuntimeException: Type does not match (class anywheresoftware.b4a.BALayout)
 
Upvote 0
Back
Top