Android Question How to add a search box when pressing a button in the B4XPage bar

AlfaizDev

Well-Known Member
Licensed User
How to add a search box when pressing a button in the B4XPage bar
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1633930342224.png


B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 200dip, 45dip)
    Dim tf As EditText
    tf.Initialize("")
    p.AddView(tf, 5dip, 0, p.Width - 10dip, p.Height)
    B4XPages.GetManager.ActionBar.RunMethod("setCustomView", Array(p))
    B4XPages.GetManager.ActionBar.RunMethod("setDisplayOptions", Array(16, 16))
End Sub

Note that it will appear in all pages.
 
Upvote 0

AlfaizDev

Well-Known Member
Licensed User
Thank you
last question
Why is the code not working?

B4X:
Private Sub tf_TextChanged (Old As String, New As String)
    Log(New)
End Sub
 
Upvote 0
Top