这是我的第一类:如何从android中的另一个类获取文本?
public void onClick(View v) {
Intent myIntent = new Intent(v.getContext(),Second.class);
myIntent.putExtra("icon_image",mThumbIds[position]);
myIntent.putExtra("icon_text", categoryContent[position]);
startActivityForResult(myIntent, 0);
二等:
ImageView img=(ImageView)findViewById(R.id.icon_product);
int theID = getIntent().getExtras().getInt("icon_image");
img.setImageResource(theID);
TextView t1 = (TextView) findViewById(R.id.name_val);
我能够从图像的Firstclass传递到二级,但我不知道如何做到这一点的文字..请帮帮我 !!!