Android Example [B4X] AS Settings - Text Property


This property is for text input. Normal text, numbers or decimal numbers.

1707945375522.png


AS_SettingsTextExample.gif


Example
B4X:
'Numeric Example
AS_Settings1.MainPage.AddProperty_Text("Advanced","PropertyName_9","Text Example","",Null,"Test",100dip,AS_Settings1.InputType_Text)
AS_Settings1.MainPage.AddProperty_Text("Advanced","PropertyName_10","Numeric Example","",Null,24,60dip,AS_Settings1.InputType_Numeric)
AS_Settings1.MainPage.AddProperty_Text("Advanced","PropertyName_11","Decimal Example","",Null,24.24,100dip,AS_Settings1.InputType_Decimal)
with the AS_Settings1.InputType_... enumeration, you specify which format the user may enter.
B4X:
AS_Settings1.InputType_Text
AS_Settings1.InputType_Numeric
AS_Settings1.InputType_Decimal
Events
If the user changes the text, the ValueChanged event is triggered.
B4X:
Private Sub AS_Settings1_ValueChanged(Property As AS_Settings_Property, Value As Object)
    'Log("ValueChanged " & Property.PropertyName & ": " & Value)
  
    Select Property.PropertyName
        Case "PropertyName_9", "PropertyName_10", "PropertyName_11"
            Log(Value)
    End Select
  
End Sub
 
Top