I want to calculate sum of two float numbers
I made 3 boxes and one button
It works for integer when i enter a float in text box it shows error
"number format exception" at run time
here is code
I made 3 boxes and one button
It works for integer when i enter a float in text box it shows error
"number format exception" at run time
here is code
B4X:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim a,b,c As EditText
End Sub
Sub sum_click
Dim u,v,x As Float
a.InputType=a.INPUT_TYPE_DECIMAL_NUMBERS
u=a.text
v=b.Text
x=u+v
c.Text =x
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("bb")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub