I'm beginning in mobile application development and I want to know how to send an item from a ListView to appear in another activity; Then I can show more information about each item.
I managed to display the title and description with the following code:
MainActivity
TextView txt = (TextView)findViewById(R.id.textView1);
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
intent.putExtra("title", txt.getText());
startActivity(intent);
SecondActivity
TextView txt = (TextView)findViewById(R.id.show_textView1);
Bundle b = this.getIntent().getExtras();
String val = b.getString("name");
txt.setText(val);
but how do I set putExtra for an image to display in the next Activity ?
P.S. everything is working fine, the xml file where the item details will be shown is set.