Android Question B4XPreferencesDialog library allow click on view outside the dialog

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Experimenting with B4XPreferencesDialog.b4xlib and using this in a B4XPages project with a custom keyboard.
The parent of this custom keyboard is page root.
I can load this custom keyboard fine by clicking in a text field of the B4XPreferencesDialog, but I can't press the keys
of the keyboard as the dialog doesn't allow this.
One solution is to make the parent of the keyboard the dialog panel, but this is not ideal as the keyboard size is then
limited by the dialog size.
What would be the answer to this problem?

RBS
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Just prior to your post I fixed this in a different way.
I moved the views btnOptions1, TextArea1 etc. (as in the B4XPreferences example project) to a panel (pnlOptions) that has the Page root as parent.
The prefdialog (again as in the B4XPreferences example project) is then initialized to this panel:

B4X:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    
    Root = Root1
    Root.Tag = miPageCode 'so we can see in clsMenu we are getting the right root
    Load_Layout
    
    Options1.Initialize
    Options2.Initialize
    
    xui.SetDataFolder ("preferences")
    
    prefdialog.Initialize(pnlOptions, "Preferences Dialog", pnlOptions.Width, pnlOptions.Height - 40dip)
    prefdialog.LoadFromJson(File.ReadString(File.DirAssets, "PhonePats_Settings.json"))
    prefdialog.SetEventsListener(Me, "PrefDialog")
    
    LoadSavedData
    
End Sub

The custom keyboard's parent remained the same (as in all B4XPages) that is the root of the B4XPage.
This seems to work all perfectly fine and keeps my code more uniform as all my B4XPages have their
views on a page base panel that comes from my page layout files.

RBS
 
Upvote 0
Top