In my searchable.xml in my android project, I get a hint indication that appears in the edittext when the text is not written. Is there a way to dynamically set this?
In my action, I have two search buttons that call startSearch , passing their own parameters. I would like to set prompts that reflect the selected action, on the basis of which the button was clicked - say, “search for movie titles”, “search participants”.
As I see this, this could potentially be achieved by passing parameters to startSearch or using a localization approach, just as I could put one hint on values-fr\strings.xml , there could be an alternative search resource file for the target when another button pressed? Or, if searchable.xml could be made into a selector so that I could act differently in different states, anyway, that would be good too ... The problem is that I could not find a way to achieve any of them.
The real reason I want to do this is because, as I see it, the best way to tell you that the default action when the device’s search button is pressed is the first search option by name.
UPDATE
To avoid confusion, I am pleased with any declarative or programmatic approach to changing mSearchTextField in EditText mSearchTextField to SearchDialog . I do not understand how to reference this EditText. Comments in code related to: "This is still controlled by SearchManager ...", but I cannot find any link to how this can be controlled from SearchManager.
source share