Android Question IME Soft Keyboard

Rogerardo

Member
Licensed User
Longtime User
I know it may be simple but I can't get the soft keyboard to display.
In Globals I have:

Dim IME1 as IME

In Activity_Create I have:

IME1.Initialize("IME1")

In my EditText (fieldname Comments) I have :

Sub Comments_FocusChanged (HasFocus As Boolean)
IME1.ShowKeyboard(Comments)
End Sub

Can anyone tell me what I need to do?
 

LucaMs

Expert
Licensed User
Longtime User
The keyboard should be appear automatically when ad editable view gets focus, without the need of IME.

IME1.ShowKeyboard(ViewX) can be used to set focus on a view and show the keyboard from anywhere in your code.

Without reading your code is difficult to understand why the keyboard does not appear.
 
Upvote 0

Rogerardo

Member
Licensed User
Longtime User
Here is my code. Very simple stuff. This is 1 module (the simplest) of 14 which makes up an invoicing, contracts due, and product locations system which downloads and uploads via FTP to a main server. Keyboard will not display automatically at all. Tablets used are all Samsung Galaxy. The emulator I use is BlueStacks, which again will not show the keyboard automatically.

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

Sub Process_Globals
End Sub

Sub Globals
Dim CustID As Label
Dim SiteID As Label
Dim CustName As Label
Dim SiteName As Label
Dim CustAdd0 As Label
Dim SiteAdd0 As Label
Dim SpecInst As EditText
Dim Comments As EditText
Dim IME1 As IME
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Comments")
IME1.Initialize("IME1")
End Sub

Sub Activity_Resume
CustID.Text=Main.G_CustomerID
SiteID.Text=Main.G_SiteID
CustName.Text=Main.G_CustName
SiteName.Text=Main.G_SiteName
CustAdd0.Text=Main.G_CustAdd0
SiteAdd0.Text=Main.G_SiteAdd0
SpecInst.Text=Main.G_SpecialInstructions
Comments.Text=Main.G_EngineerComments
IME1.ShowKeyboard(Comments)

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Quit_Click
Main.G_SpecialInstructions=SpecInst.Text
Main.G_EngineerComments=Comments.Text
rysubs.save_data("")
Activity.Finish
End Sub

Sub Comments_FocusChanged (HasFocus As Boolean)
'IME1.ShowKeyboard(Comments)

End Sub

Sub IME1_HandleAction As Boolean
'IME1.ShowKeyboard(Comments)

End Sub
 
Upvote 0
Top