android - singleInstance launch mode: why is onCreate called after activity is brought to front? -


i launch main activity, change settings in ui, press button , reopen activity. oncreate() called again , activity default state. why this?

i expect onresume() called since have in manifest:

android:launchmode="singleinstance" 

try using movetasktoback(true); in onbackpressed() make current activity hide instead of destroying, can reopen again

@override public void onbackpresses(){    movetasktoback(true); } 

Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -