検索ウィジェットのアクション ビュー インテントがインテントを送信しない トーストを使用して、ユーザーがクイック検索ボックスの提案からアイテムを選択したときにインテントが送信されるかどうかを表示しています
これは、検索可能なアクティビティでインテントが受信されるスニペットです
if (Intent.ACTION_VIEW.equals(intent.getAction())){ /* Intent countryIntent = new Intent(this, RecordActivity.class); countryIntent.setData(intent.getData()); startActivity(countryIntent); */ Toast.makeText(this,"click",Toast.LENGTH_LONG).show(); finish(); }
検索ウィジェットが Action View をサポートする searchable.xml のスニペット
android:searchSuggestIntentAction="android.Intent.action.VIEW"
action_search は機能しますが、意図からまったく送信されない Uri はaction_view
ありません。理由はわかりません。