I need send a imageview like i send the string "title", but i can't, how can i send a imageview (R.drawable.image) from mainactivity to secondactivity?
THANKS
MAIN ACTIVITY
public void NewActivity(View view){
Intent intent = new Intent(this, SecondActivity.class);
intent.putExtra("title", getString(R.string.title));
startActivity(intent);
}
SECOND ACTIVITY
@Override
public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(R.layout.pantalla);
Bundle extras = getIntent().getExtras();
if (extras == null)
{
return;
}
String title = extras.getString("title");
TextView textview = (TextView)findViewById(R.id.titulo);
textview.setText(title);
}