R RichardN Well-Known Member Licensed User Longtime User Apr 12, 2023 #1 I am recompiling a single Activity, single screen calculator I wrote a few years ago following some minor modifications. The platform is a Samsung S21 Ultra running Android 13. TargetSdkVersion="31". The FocusChanged event for the edit text never fires.... not in Debug nor Release modes ???? Code: Copy Sub Globals Private txtPatternInclude As EditText End Sub . . . Private Sub txtPatternInclude_FocusChanged (HasFocus As Boolean) 'Sub never fires Log("I am here") ToastMessageShow("I am here",True) End Sub There are some code snippets on the forum that use the Reflection library to make the View focusable but they appear well out of date and don't work. I am sure I will be told to use B4Xpages once again but porting the code over is too time consuming for very little benefit. Is there a solution to getting the FocusChanged event to fire?
I am recompiling a single Activity, single screen calculator I wrote a few years ago following some minor modifications. The platform is a Samsung S21 Ultra running Android 13. TargetSdkVersion="31". The FocusChanged event for the edit text never fires.... not in Debug nor Release modes ???? Code: Copy Sub Globals Private txtPatternInclude As EditText End Sub . . . Private Sub txtPatternInclude_FocusChanged (HasFocus As Boolean) 'Sub never fires Log("I am here") ToastMessageShow("I am here",True) End Sub There are some code snippets on the forum that use the Reflection library to make the View focusable but they appear well out of date and don't work. I am sure I will be told to use B4Xpages once again but porting the code over is too time consuming for very little benefit. Is there a solution to getting the FocusChanged event to fire?
Solution R R RichardN Apr 12, 2023 Hi @klaus I appreciate that. The error has been traced to a corrupt .bal file that produced the event name conflict. All working as advertised now.
Hi @klaus I appreciate that. The error has been traced to a corrupt .bal file that produced the event name conflict. All working as advertised now.
klaus Expert Licensed User Longtime User Apr 12, 2023 #2 If the EditText already has the focus the FocusChanged event will not be fired. Upvote 0
R RichardN Well-Known Member Licensed User Longtime User Apr 12, 2023 #3 Hi @klaus I appreciate that. The error has been traced to a corrupt .bal file that produced the event name conflict. All working as advertised now. Last edited: Apr 12, 2023 Upvote 0 Solution
Hi @klaus I appreciate that. The error has been traced to a corrupt .bal file that produced the event name conflict. All working as advertised now.