I have an activity that can be open with a widget and by pressing the icon. I am wondering how i close the old activity when I press the icon then the home button then the widget?
How I want it to work:
- open activity by pressing icon (show main view)
- do some stuff in activity(open dialog, change views, etc.)
- press home button (shows home screen)
- open activity with widget button (show main view)
- press back button (shows home screen)
How it actually works:
- open activity by pressing icon (show main view)
- do some stuff in activity(open dialog, change views, etc.)
- press home button (shows home screen)
- open activity with widget button (show main view)
- press back button (shows old activity opened with icon)
I have tried using android:clearTaskOnLaunch="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleTop"
seems like it should work but it just opens the old activity with the changed view
is there any way to do this without using finish() in onUserLeaveHint()?