I am using Betterdialogs for some. I am getting this error when I try to load the keyboard before the dialog.
java.lang.IllegalArgumentException: method anywheresoftware.b4a.objects.IME.ShowKeyboard argument 1 has type android.view.View, got anywheresoftware.b4a.agraham.dialogs.InputDialog
Here is my code:
B4X:
Sub spnNameTeams_ItemClick (Position As Int, Value As Object)
Dim anInputDialog As InputDialog
IME.ShowKeyboard(anInputDialog)
If aList.IsInitialized Then
anInputDialog.Show("New Team Name:","Current Team Name:" & Value,"OK","Cancel","",Null)
If anInputDialog.Response=DialogResponse.POSITIVE Then
Dim newValue As String=anInputDialog.Input
aList.RemoveAt(Position)
aList.InsertAt(Position,newValue)
spnNameTeams.Clear
spnNameTeams.AddAll(aList)
End If
ImputDialog is not a View. You cannot pass it to IME.ShowKeyboard. I recommend you to use a non-modal dialog instead. It will make it simpler to customize the behavior.