Android Question setlayout not exist for SearchView?

fifiddu70

Well-Known Member
Licensed User
Longtime User
i need to set the SearchView setlayout for open app in multi size screen, for example the edittext.setlayput is present but SearchView not present.
 

fifiddu70

Well-Known Member
Licensed User
Longtime User
Sorry but non exist SearchView.mBase.SeLayout
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
LucaMs thanks, Now I hope to succeed in the operation, a question....when I type a word and it appears in the list of words found and then I click on the desired one, in the field where I typed the search word I am left with what I wrote, instead I would like it to clear the search box when I click on the found word so that I can immediately type another new word.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Add this sub to the SearchView class:
B4X:
Public Sub ClearEditText
    et.Text = ""
End Sub

In your project:
Sub SearchView1_ItemClick(Value As String)
    ' use the Value here, then:
    SearchView1.ClearEditText
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…