Android Question [XUI Views] (SOLVED) Change search field text

Rubsanpe

Active Member
Licensed User
Hi, in the XUI Views "SearchTemplate", the text in the search field says "search", how can it be changed to another text in another language?

Thank you

Ruben
 
Last edited:

Mahares

Expert
Licensed User
Longtime User
See the first search result: h
Of course this is the correct way as Erel explained:
B4X:
SearchTemplate.SearchField.HintText = "Chercher"
    SearchTemplate.SearchField.Update
I tried for more than an hour using only the first line and could not come up with it. But how are you supposed to know ro add the second line:
SearchTemplate.SearchField.Update. That is why taking advantage if the XUI Views lib is still not popular because there are so many properties and memebers. Most of the time, all you do is guess and hope it works. It is a hit and miss
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
That is why taking advantage if the XUI Views lib is still not popular
1. It took me 10 seconds to find the post with the answer.
2. How do you know that it is not popular? You should say that YOU find it difficult to use. Don't assume that you represent all members.
3. There is a reason why there are many properties and fields exposed. XUI Views, B4XDialog, B4XTable, xCLV and other views implemented in B4X are built to be highly customizable and flexible. The downside of it is that many things are exposed. I also recommend developers to check the source code. It is inside the b4xlib.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
It took me 10 seconds to find the post with the answer.
The problem is not finding it. The difficulty is : When do you know you have to use the second line: SearchTemplate.SearchField.Update. Most properties do not require it.
 
Upvote 0
Top