アプリの検索を作成していますが、最後に行う必要があることの 1 つは、ユーザーが検索候補をクリックしたときにデータを「抽出」することです。によってデータを設定Intent.ACTION_VIEW
および取得しましたintent.getData()
。検索可能なアクティビティで。しかし、データに「パッケージ化」された TextViews や ImageView などのオブジェクトを表示するには、どうすればよいでしょうか? あまり経験がないので、どなたかアドバイスいただけないでしょうか。
どうもありがとう
コードの私の例:
if (Intent.ACTION_VIEW.equals(intent.getAction())) {
setContentView(R.layout.activity_more);
intent.getData();
final ProgressBar progress = (ProgressBar) findViewById(R.id.more_progress);
progress.setVisibility(View.VISIBLE);
TextView about = (TextView)findViewById(R.id.more_about);
TextView animal = (TextView)findViewById(R.id.more_animal);
final ImageView imgUrl = (ImageView)findViewById(R.id.more_imgUrl);
//now do i need to set Text etc., but how?
}