Finish any previous activity in stack from current activity?

前端 未结 4 867
别那么骄傲
别那么骄傲 2020-12-29 12:27

How to finish any previous activity in application stack (at any level , I mean not immediate parent) , from current activity like on some particular event I want to invalid

4条回答
  •  执念已碎
    2020-12-29 13:11

    This may be possible by using static variables. Like use a boolean variable activity_name_dirty = false; mark this as true as soon as your condition of invalidating that particular activity occurs. So any time later when calling this activity have a check on the state of activity_name_dirty. You may then use Activity Flags to create a new instant as described in Activity Fundamentals

提交回复
热议问题