I would like to create an application that allows me to enter through sp1 sum in euros, this appears to be txteuro.text, I would like to add that whenever I select a sum of sp1 and display of txttoteuro.text
I wrote this code but it gives me error.
I wrote this code but it gives me error.
B4X:
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 sp1 As Spinner
Dim txteuro As EditText
Dim txttoteuro As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout ("calculator")
sp1.Add(" € 1,00")
sp1.Add(" € 2,00")
sp1.Add(" € 3,00")
sp1.Add(" € 4,00")
sp1.Add(" € 5,00")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub sp1_ItemClick (Position As Int, Value As Object)
txteuro.Text = sp1.SelectedItem
txttoteuro.Text = txttoteuro.Text + txteuro.Text
End Sub