java - How to change the imagebutton over another activity? -


i have onclick method , when click on onclick change imagebutton in mainactivitiy.class

this onclick:

    public void onclick8 (view view) {         //here should go command change imagebutton in mainactivity.class         intent myintent = new intent(view.getcontext(), mainactivity.class);         startactivity(myintent);         finish();         mediaplayer mediaplayer = mediaplayer.create(zem13.this, r.raw.song);         mediaplayer.start();    } 

if can please show code set in mainactivity.class , other activity.

use string references , set string activity , when came activity can change image if


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -