Android Question Customview properties

stevenindon

Active Member
Licensed User
Hello all,

I have created a custom view with some custom properties as listed as such:

#DesignerProperty: Key: StringExample, DisplayName: Title Text, FieldType: String, DefaultValue: Text

How can i access the value of the properties (Title Text) in my customview?

dim Label1 as label
Label1.initialize
Label1.text=mbase.StringExample <--------- ?

Thanks
 

Alexander Stolte

Expert
Licensed User
Longtime User
In the "DesignerCreateView" sub is a "Props" parameter.

Make a modul variable e.g. mStringExample as String

and then do this:
B4X:
mStringExample = Props.Get("StringExample")
'or
Label1.Text = Props.Get("StringExample")
 
Upvote 1
Top