Is there an easy way or another workaround to delete the backstack in Android pre Honeycomb(before API level 11)? People suggest using the FLAG_ACTIVITY_CLEAR_TOP in conjunction with FLAG_ACTIVITY_NEW_TASK when starting a new activity, but this does only delete the stack on top of my current position, not the stack under my position. It should not be that hard to start from a fresh task. Some ideas around this? I can not use FLAG_ACTIVITY_CLEAR_TASK because I need to support those versions beneath api level 11. Is there an equivalent to FLAG_ACTIVITY_CLEAR_TASK that clears the whole navigation backstack. Or something similiar to FLAG_ACTIVITY_REORDER_TO_FRONT that reorders to back, and then I can clear everything on top of it. All suggestions are highly appreciated:) Thanks!
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can also use a broadcast listener.
Just make a broadcast listener in all the activities with a "STRING" to recognise.
Whenever you want to delete all the activities, fire the intent.
Those activities that have registered for the above listener (to be done by depending on which activites you wanna finish), will intercept that and will get finish.
This is gonna work in any release of the Android.
Why don't you create a static ArrayList of all the previous activities and clear the ones you don't want whenever you want using the activity.destroy()
you are looking for this:
use android compatibillity lib from google - found in the sdk.
depending on your API version it might also be: