I have an editbox where the keyboard is disabled, sub is below
Basically the sub works fine, an edittext_click event is also trapped and runs this sub (user has accidently pressed cancel).
The problem is, when the data dialog is visible and the user presses the day, month or year (not the + or - buttons), the keyboard pops up and doesn't go away till back is pressed. What can I do?
Thanks
Mark
B4X:
Sub ImuneDate_FocusChanged(HasFocus As Boolean)
Dim b As EditText
Dim Dd As DateDialog
Dim datestring As String
b=Sender
'Stop keyboard from showing
b.InputType=dlgCode.INPUT_TYPE_NONE
Dim ret As String
Dd.Year = DateTime.GetYear(DateTime.Now)
Dd.Month = DateTime.GetMonth(DateTime.Now)
Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)
If HasFocus Then
ret=Dd.show("Enter Date", "", "OK", "CANCEL", "", Null)
If ret = DialogResponse.CANCEL Then
Return
End If
DateTime.DateFormat = "dd.MM.yyyy"
datestring=NumberFormat(Dd.DayOfMonth,2,0) & "." & NumberFormat(Dd.month,2,0) & "." & Dd.Year
b.Text=datestring
DataHasChanged=1
If btnSave.Visible=False Then 'Show save button
btnSave.Visible=True
End If
End If
End Sub
Basically the sub works fine, an edittext_click event is also trapped and runs this sub (user has accidently pressed cancel).
The problem is, when the data dialog is visible and the user presses the day, month or year (not the + or - buttons), the keyboard pops up and doesn't go away till back is pressed. What can I do?
Thanks
Mark