Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see the activity stack in debug?

I have a problem that one of my activities is popping out after I think I finished it.

Is there a way to see the stack of the activities?

like image 964
AlikElzin-kilaka Avatar asked Jul 07 '12 05:07

AlikElzin-kilaka


People also ask

How do I view Backstacks on Android?

1): View->Tool Windows->Android. Then on the left hand side select the System Information Icon and from it's drop down select 'Graphics State'. This will dump show a lot of information, but if you scroll down to 'View hierarchy:' you will see the current stack of views i.e. the 'Back Stack'.

What is activity stack?

A task is a collection of activities that users interact with when trying to do something in your app. These activities are arranged in a stack—the back stack—in the order in which each activity is opened. For example, an email app might have one activity to show a list of new messages.


1 Answers

1-You can use Hierarchy Viewer within Eclipse.You can see all connected devices and emulators and the activity stack. And in addition in the tree view you can see much more information about the view itself:
enter image description here

2-From the command line, you can use this: adb shell dumpsys activity.This asks the activity manager to print a dump of its current state. The first part of that is the complete activity history, organized by task.
You can see more details here.

like image 151
hasanghaforian Avatar answered Sep 18 '22 12:09

hasanghaforian