0
我正在爲我的應用程序創建搜索,我需要做的最後一件事情之一是在用戶單擊搜索建議時「提取」數據。我設置了Intent.ACTION_VIEW
並通過intent.getData()
得到了數據;在我的搜索活動。但是,我現在應該怎麼做才能查看數據中的「打包」TextView和ImageView等對象?我對此沒有太大的經驗,所以你能給我一些建議嗎?如何在Intent.ACTION_VIEW之後顯示數據?
非常感謝
我的代碼示例:
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?
}