开发者

Android: How to clear activity stack from widget

开发者 https://www.devze.com 2023-01-27 03:02 出处:网络
Is there a way to clear activity stack from widget? I have following situation: From widget user presses button what starts new activity A. Next user move from A to new activity B. After that he pres

Is there a way to clear activity stack from widget?

I have following situation: From widget user presses button what starts new activity A. Next user move from A to new activity B. After that he presses 开发者_JAVA技巧home button which takes him back to home screen. Now if he presses button again, he will be moved directly to the activity B.

I thought ACTIVITY_FLAG_CLEAR_TOP would help, but it didn't.


Does activity A start activity B? If so you can start it with the FLAG_ACTIVITY_NO_HISTORY flag to specify not to put B in the history stack.

0

精彩评论

暂无评论...
验证码 换一张
取 消