gd.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent=new Intent(MainActivity.this, MAin.class); intent.putExtra("name", list.get(position).getGoods_name()); intent.putExtra("ima", list.get(position).getGoods_img()); intent.putExtra("jiaqian", list.get(position).getShop_price()); startActivity(intent); } });
setContentView(R.layout.dianji_item); ima = (ImageView) findViewById(R.id.image01); tv1 = (TextView) findViewById(R.id.textView01); tv2 = (TextView) findViewById(R.id.shop_price01); Intent intent=getIntent(); String name02=intent.getStringExtra("name"); String image=intent.getStringExtra("ima"); String jia=intent.getStringExtra("jiaqian"); BitmapUtils bitmapUtils = new BitmapUtils(this); bitmapUtils.display(ima, image); tv1.setText(name02); tv2.setText(jia);