开发者

Android - custom quick search box

开发者 https://www.devze.com 2023-01-24 06:17 出处:网络
If you using Twitter for Android you can see that clicking on phone\'s hard search button brings fully customized quick search-like control. Now I\'m not saying that it IS stock Android customized qui

If you using Twitter for Android you can see that clicking on phone's hard search button brings fully customized quick search-like control. Now I'm not saying that it IS stock Android customized quick search but how would one build something like that? I want quick search box behavior but I also want add some additional sele开发者_如何学Cctors (think Firefox search where on the left there's a dropdown to select search engine) I suspect that clicking search brings another activity that just looks like a quick search. Now I know how to trigger search activity from the quick search but how to intercept quick box call and display your activity instead? Where would I start with something like that? Any hints and pointers will be greatly appreciated


With no screenshot, I can't help terribly much, since I don't use the official Twitter app (I'm a Seesmic guy), so I don't quite know what you are talking about.

You can override onSearchRequested() to get control when the user requests a search in your activity. Return true to say you're handling the search yourself. Along the way, pop up whatever you like to allow the user to do a search.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号