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?
}