https://www.b4x.com/android/forum/t...hat-wont-keep-the-keyboard.63074/#post-398552
Hi
In my case I use
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The keyboard does not open automatically, I must click in the text box to make the keyboard appear and when I exit (as you say) the keyboard remains open
some advice? to take the focus and/or open/close the keyboard automatically.
			
			If the virtual keyboard is opened with the OpenKeyboard property of BetterDialogs, then it is properly closed when the dialog is closed. BUT it cannot be closed if you open it by clicking on the EditText because BetterDialogs does not know that a virtual keyboard is opened. It's not related at all to the modality of the dialog. Run the following code after CustomDialog and the virtual keyboard will close:
B4X:Dim r As Reflector r.Target = BD r.RunStaticMethod("flm.b4a.betterdialogs.BetterDialogs", "FermerClavierVirtuel", Array(r.GetActivityBA), Array As String("anywheresoftware.b4a.BA"))
Hi
In my case I use
			
				B4X:
			
		
		
		    IP.Initialize
    IP.Question = msg
    IP.QuestionTextSize = 14
    IP.SpaceBetween = 4dip
    IP.InputTextSize = 20
    Select tip
        Case "c"
            IP.InputType = IP.INPUT_TYPE_TEXT
        Case "C"
            IP.InputType = IP.INPUT_TYPE_TEXT_WITH_CAPS
        Case "n"
            IP.InputType = IP.INPUT_TYPE_NUMBERS_WITH_SIGN
        Case "N"
            IP.InputType = IP.INPUT_TYPE_NUMBERS
        Case "d"
            IP.InputType = IP.INPUT_TYPE_DECIMAL_NUMBERS
        Case "D"
            IP.InputType = IP.INPUT_TYPE_DECIMAL_NUMBERS
        Case "t"
            IP.InputType = IP.INPUT_TYPE_PHONE
        Case "T"
            IP.InputType = IP.INPUT_TYPE_PHONE
    End Select
   
    IP.Gravity = Gravity.CENTER_VERTICAL + Gravity.CENTER_HORIZONTAL
    'IP.ValidationCallback = "Input_Validation"
    IP.Hint=val
    'IP.Default=val
    IP.WithSuggestions = True
    RES = BD.InputBox(tit, IP, btn1, btn2, "", Null)
        Dim r As Reflector
        r.Target = BD
        r.RunStaticMethod("flm.b4a.betterdialogs.BetterDialogs", "FermerClavierVirtuel", Array(r.GetActivityBA), Array As String("anywheresoftware.b4a.BA"))The keyboard does not open automatically, I must click in the text box to make the keyboard appear and when I exit (as you say) the keyboard remains open
some advice? to take the focus and/or open/close the keyboard automatically.
 
				 
 
		 
 
		 
			 
 
		