1. View through the Profiler analysis tool of AndroidStudio:
2. View through the adb shell command:
// 查看当前Activity名称
adb shell dumpsys activity|findstr ResumedActivity
Other adb shell commands:
// 查看所以Activity
adb shell dumpsys activity activities
// 查看当前Activity名称
adb shell dumpsys activity|findstr ResumedActivity
// 会显示出包名和Activity类名
// 主意的是这个命令只能定位Activity,如果是fragment则显示该fragment所依附的Activity.
adb shell "dumpsys window | grep mCurrentFocus"