1
現在我有這個搜索欄,下面的代碼。搜索欄,但無法搜索。
鏈接:http://pastebin.com/6vSBR8iX
我如何讓它成爲搜索窗口,如市場有類型?
這是我的Android清單。
鏈接:http://pastebin.com/ue6NSTCr
有人請幫我出這一點。我已經嘗試過
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.search);
// Get the intent, verify the action and get the query
Intent intent = getIntent();
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
doMySearch(query);
}
}
但是無法搜索到。
任何人都可以建議如何解決像androidmarket的搜索欄? – FreshMeat