需要帮忙。这可能很奇怪。
第一个活动有列表视图(如lazyadapter),一旦我单击列表,它就会打开一个带有描述、标题和图像的新活动。但我无法显示图像。不知道怎么寄。。。
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String title = ((TextView) view.findViewById(R.id.title)).getText().toString();
String description = ((TextView) view.findViewById(R.id.artist)).getText().toString();
String pdate = ((TextView)view.findViewById(R.id.pdate)).getText().toString();
//ImageView thumb = ((ImageView) view.findViewById(R.id.list_image));
// Starting new intent
Intent in = new Intent(getApplicationContext(), SingleMenuItemActivity.class);
in.putExtra(KEY_PLAYER, title);
in.putExtra(KEY_THUMB_URL, R.id.list_image);
in.putExtra(KEY_TRANSACTION, description);
in.putExtra(KEY_PUBDATE, pdate);
startActivity(in); }
我的第二个活动
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent in = getIntent();
String title = in.getStringExtra(KEY_PLAYER);
String description = in.getStringExtra(KEY_TEXT);
String pdate = in.getStringExtra(KEY_PUBDATE);
String thumb_image = in.getStringExtra(KEY_THUMB_URL);
TextView lblName = (TextView) findViewById(R.id.name_label);
TextView lblDesc = (TextView) findViewById(R.id.description_label);
TextView lblPdate = (TextView) findViewById(R.id.pubdate_label);
ImageView thumb = (ImageView) findViewById(R.id.thumb_label);
lblName.setText(title);
thumb.setImageURI(Uri.parse(thumb_image));
lblDesc.setText(description);
lblPdate.setText(pdate);