Set search hint dynamically

后端 未结 7 1443
悲哀的现实
悲哀的现实 2021-02-08 04:38

Does anybody knows how to set android search dialog hint dynamically? T have try to do something like:




        
相关标签:
7条回答
  • 2021-02-08 05:03

    They've added a note at http://developer.android.com/guide/topics/search/search-dialog.html#SearchableConfiguration stating that

    Note: The system uses this file to instantiate a SearchableInfo object, but you cannot create this object yourself at runtime—you must declare the searchable configuration in XML.

    So it seems that the answer to your question is that you cannot set the search dialog hint dynamically.

    0 讨论(0)
提交回复
热议问题