开发者

Android Activity Stack

开发者 https://www.devze.com 2023-02-16 19:46 出处:网络
How to see if the next time I press the back (hardware) button, will take me on the screen. My question is 开发者_如何学JAVAbasically: Is there a way to see the size of the Activity Stack (API level 7

How to see if the next time I press the back (hardware) button, will take me on the screen. My question is 开发者_如何学JAVAbasically: Is there a way to see the size of the Activity Stack (API level 7).


boolean Activity.isTaskRoot(); Since: API Level 1

Return whether this activity is the root of a task. The root is the first activity in a task.

Just don't do it in onCreate() as the calling activity may not have finish()ed itself yet.

0

精彩评论

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