自动完成文本视图还是搜索对话框?
我需要做的只是可以单击关键字的建议并将用户带到界面(xml 布局)。例如下面的结果:存在、丰富、缺乏。我在 R.layout.abide 中创建了它们
虽然 AutoCompleteTextView
似乎不那么麻烦,但是可以完成吗?或者唯一的方法是通过 SearchDialog
?我没有使用 SearchWidget
因为我正在执行 api 级别 8。
What i need to be done are just the suggestions of keywords can be clicked and bring user to the interfaces (xml layout). For example the result below abide, abound, absence. I created them in R.layout.abide
Though AutoCompleteTextView
seem to be less hassle but can it be done ? Or the only way to do it is through SearchDialog
? I am not using SearchWidget
because i am doing api level 8.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我没记错的话,您希望用户只需从“自动完成”中选择一个项目,一旦他选择了它,它就会带您进入另一个活动。如果是这种情况,那么您可以按如下方式实现。
或者,如果您想保持相同的活动,但想根据用户在自动完成中所做的选择更改其 xml,那么您可以 setContentView(your xml);在上述情况下进行各种选择。
If I am not wrong,you want user to just select an item from AutoComplete and once he selects it,it should bring you to another activity.if it is the case then you can achieve it as below.
Or if you want to stay on the same activity but want to change its xml according to the selection user makes in AutoComplete then you can setContentView(your xml); in above cases for various selection.