Android shared element transtion from one activity to another -
so have recycler view holds images downloaded internet. have onclick listener images executes new activity.
i transit image clicked antoher activity. tried activityoptionscompat.makescenetransitionanimation method, doesn't show. image in second activity not populated.
it appricited if knows solution problem. thank you.
if understand want in 1st activity downloads image save image file, , pass filename string second activity extra:
final intent intent = new intent(firstactivity.this, secondactivity.class); final bundle bundle = new bundle(); bundle.putstring("imagefile", "/path/of/the/saved/image"); intent.putextras(bundle); startactivity(intent); and in second activity:
public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); final bundle bundle = getintent().getextras(); final string imagefile = bundle.getstring("imagefile");
Comments
Post a Comment