Dim Base As B4XView
Dim Dialog As B4XDialog
Dim input As B4XInputTemplate
Base = Activity
Dialog.Initialize (Base)
Dialog.Title = ""
input.Initialize
input.lblTitle.Text = "Extra Fuel:"
input.ConfigureForNumbers(False, False)
input.Text = "100"
Dialog.Title = "Set Extra Fuel"
Wait For (Dialog.ShowTemplate(input, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = XUI.DialogResponse_Positive Then
ExtraFuel= input.Text 'no need to check with IsNumber
End If