M Martincg Member Licensed User Longtime User Jan 5, 2015 #1 I have used the IME library so that I can keep the keyboard on screen all the time for a certain activity. There is one TextEdit for the text and I have tried with "Force Done" set to true and false. The action key text is "Finished". How do I change it? (Nexus 7)
I have used the IME library so that I can keep the keyboard on screen all the time for a certain activity. There is one TextEdit for the text and I have tried with "Force Done" set to true and false. The action key text is "Finished". How do I change it? (Nexus 7)
mangojack Well-Known Member Licensed User Longtime User Jan 5, 2015 #2 try this ... change to array value to suit . See Here ... IME_ACTIONS ... B4X: Dim jo As JavaObject = EditText1 jo.RunMethod("setImeOptions", ArrayAsObject(6)) '6 = EditorInfo.IME_ACTION_DONE Last edited: Jan 6, 2015 Upvote 0
try this ... change to array value to suit . See Here ... IME_ACTIONS ... B4X: Dim jo As JavaObject = EditText1 jo.RunMethod("setImeOptions", ArrayAsObject(6)) '6 = EditorInfo.IME_ACTION_DONE
M Martincg Member Licensed User Longtime User Jan 6, 2015 #3 Thanks for your suggestion mangojack. Unfortuneately I don't understand what you meant. What is ArrayAsObject(6) ? I read the link you gave but I have no idea how to use most of that information . There is public CharSequence actionLabel but how do I set that from B4A? I found this code gives me a way to set the text or symbol I want. B4X: Dim ref As Reflector ref.Target = EditText1 ref.RunMethod2("setImeOptions",0x08000001, "java.lang.int") 'IME_FLAG_NO_EXTRACT_UI |IME_ACTION_SEND constants 'IME_ACTION_SEND = 1 ->enter symbol, '2 -> "Go", '3 -> magnifying glass(Search), '4 -> "Send", '5 -> "Next", '6 -> "Finished", '7 -> "Prev", And if I don't want the action key to change after pressing it the first time I can just call that code again. So my problem is resolved. Upvote 0
Thanks for your suggestion mangojack. Unfortuneately I don't understand what you meant. What is ArrayAsObject(6) ? I read the link you gave but I have no idea how to use most of that information . There is public CharSequence actionLabel but how do I set that from B4A? I found this code gives me a way to set the text or symbol I want. B4X: Dim ref As Reflector ref.Target = EditText1 ref.RunMethod2("setImeOptions",0x08000001, "java.lang.int") 'IME_FLAG_NO_EXTRACT_UI |IME_ACTION_SEND constants 'IME_ACTION_SEND = 1 ->enter symbol, '2 -> "Go", '3 -> magnifying glass(Search), '4 -> "Send", '5 -> "Next", '6 -> "Finished", '7 -> "Prev", And if I don't want the action key to change after pressing it the first time I can just call that code again. So my problem is resolved.
mangojack Well-Known Member Licensed User Longtime User Jan 6, 2015 #4 It should have been 'Array As Object' and achieves the same ... B4X: Dim jo As JavaObject = EditText1 jo.RunMethod("setImeOptions", Array As Object(6)) '6 = EditorInfo.IME_ACTION_DONE 'IME_ACTION_SEND = 1 ->enter symbol, '2 -> "Go", '3 -> magnifying glass(Search), '4 -> "Send", '5 -> "Next", '6 -> "Done", Upvote 0
It should have been 'Array As Object' and achieves the same ... B4X: Dim jo As JavaObject = EditText1 jo.RunMethod("setImeOptions", Array As Object(6)) '6 = EditorInfo.IME_ACTION_DONE 'IME_ACTION_SEND = 1 ->enter symbol, '2 -> "Go", '3 -> magnifying glass(Search), '4 -> "Send", '5 -> "Next", '6 -> "Done",