Hi all,
I'd like some detailed info about the workings of the whole Delegates stuff (to heighten my general knowledge).
Then I'd like to understand how to use correctly the PreferenceDialog in a secondary B4xPage.
Among the requirements for a PreferenceDialog there's an Activity_KeyPress sub (that check prefdialog.BackKeyPressed), IME management and a macro to insert in the Manifest relating to Main.
I would use B4XPage_CloseRequest like below:
This should limit the closing to the dialog (if it's open) remaining on the B4XPage. Otherwise (there's no dialog showing) close the page.
But what if the KeyCode to intercept is not the KEYCODE_BACK? What code should be in place on the page to react appropriately?
udg
I'd like some detailed info about the workings of the whole Delegates stuff (to heighten my general knowledge).
Then I'd like to understand how to use correctly the PreferenceDialog in a secondary B4xPage.
Among the requirements for a PreferenceDialog there's an Activity_KeyPress sub (that check prefdialog.BackKeyPressed), IME management and a macro to insert in the Manifest relating to Main.
I would use B4XPage_CloseRequest like below:
B4X:
Private Sub B4XPage_CloseRequest As ResumableSub
If prefdialog.BackKeyPressed Then Return False
Return True
End Sub
But what if the KeyCode to intercept is not the KEYCODE_BACK? What code should be in place on the page to react appropriately?
udg