Hi,
I open a activity with a multiline edittext view and two buttons (OK, Cancel)
I load some text bevor and save the edited text after OK. That works, but...
I want to set the focus inside the edittext and show the virtual keyboard.
I tried it this way:
I got the edittext with the right old text to edit and there is a small cursor in the view, but there is NO keyboard ...
If I touch the edittext view, the right keyboard will come .
And after i touch OK, the text is saved, the activity is closed and I see the starting activity, BUT WITH the keyboard ...
I thought I could hide by this, but this does not work.
Any Idea ?
PS: I can hide the keyboard by pressing the phones BACK button, but I need it automatic ;-)
I open a activity with a multiline edittext view and two buttons (OK, Cancel)
I load some text bevor and save the edited text after OK. That works, but...
I want to set the focus inside the edittext and show the virtual keyboard.
I tried it this way:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Log("EdtBem start: " & sBemerkung ) ' OK
Activity.LoadLayout("WinBemerkung") ' will show
Activity.Title = main.sTitle & " - Bemerkungen" ' OK
edtBemerkung.Text = sBemerkung ' OK
edtBemerkung.RequestFocus ' ?
edtBemerkung.InputType = edtBemerkung.INPUT_TYPE_TEXT ' ?
DoEvents
End Sub
I got the edittext with the right old text to edit and there is a small cursor in the view, but there is NO keyboard ...
If I touch the edittext view, the right keyboard will come .
And after i touch OK, the text is saved, the activity is closed and I see the starting activity, BUT WITH the keyboard ...
B4X:
Sub Activity_Pause (UserClosed As Boolean)
Log("EdtBem Stop: (" & UserClosed & ") " & sBemerkung )
edtBemerkung.InputType = edtBemerkung.INPUT_TYPE_NONE
DoEvents
End Sub
I thought I could hide by this, but this does not work.
Any Idea ?
PS: I can hide the keyboard by pressing the phones BACK button, but I need it automatic ;-)