java - When bringing Android activities from the stack to the front, how do I refresh (reinitialize) them? So to run onCreate again etc -
if i'm bringing android activities stack front, how refresh them? run oncreate again etc.
my code below, in conjunction setting activities in android manifest android:launchmode="singletask" allows me initiate activity if activity not active within stack, if active within stack brought front.
how then, if activity brought front refresh oncreate ran again etc.
intent intent = new intent(myactivity.this, myactivity.class); intent.addflags(intent.flag_activity_reorder_to_front); startactivity(intent);
i think flag_activity_clear_top resolved problem:
intent intent = new intent(myactivity.this, myactivity.class); intent.addflags(intent.flag_activity_clear_top); startactivity(intent);
Comments
Post a Comment