2011-11-28 50 views
1

我正在关注http://developer.android.com/guide/topics/search/search-dialog.html,为我的应用创建可搜索的活动。我正在使用数据库的sqlite。一个例子“doMySearch(查询)”(请参阅​​链接)为sqlite是我正在寻找。Sqlite的搜索,如何?

public class SearchableActivity extends ListActivity { 

@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); 
    } 
} 

} 
+2

什么错误,你遭遇? – tidwall

+0

sqlite的文档:http://developer.android.com/guide/topics/data/data-storage.html#db – Izkata

+0

我是所有这些东西总noob。我只想说我对sqlite没有任何认识。我正在寻找一个包含doMySearch(查询)或类似的sqlite的教程。 –

回答