Google サンプルのデータベース ディクショナリ サンプルをいじってみました。
それは次のようなことをします:
private void handleIntent(Intent intent) {
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
// handles a click on a search suggestion; launches activity to show word
Intent wordIntent = new Intent(this, WordActivity.class);
wordIntent.setData(intent.getData());
startActivity(wordIntent);
} else if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
// handles a search query
String query = intent.getStringExtra(SearchManager.QUERY);
showResults(query);
}
UI にデータを事前に入力したい (Google サンプルには空のリストがあります)。クエリは「*」である必要があります。これどうやってするの?