Which view has the focus after activity-create?
Can I set this focus per code?
(background: I want to remove focus from edittext after Enter pressed. The Reflector solution removes the ability to get focus, not acceptable. Did not test phone hidekeyboard , as the code is in a class. To use an Edittext outside the screen is a lousy solution imho. Try to set focus to the parent panel also fails. Isn't there a neat/fair solution?)
Sub Activity_Create
Activity.Loadlayout("xxx")
SetFocusable(Panel1, True)
EditText1.RequestFocus
' '''
End Sub
B4X:
Sub EditText1_EnterPressed
RequestFocus(Panel1)
End Sub
Sub SetFocusable(Vw As View, Focusable As Boolean)
Dim jo As JavaObject = Vw
jo.RunMethod("setFocusable", Array(Focusable))
jo.RunMethod("setFocusableInTouchMode", Array(Focusable))
End Sub
Sub RequestFocus(Vw As View)
Dim jo As JavaObject = Vw
jo.RunMethod("requestFocus", Null)
End Sub