Tuesday, 15 February 2011

Get info of current visible fragment(s) in android dumpsys -



Get info of current visible fragment(s) in android dumpsys -

i'm looking solution determine fragments visible dumpsys

i can info activities

$ adb shell dumpsys activity | grep -i run

is there solution fragments or how determine visible fragments dumpsys?

check documentation adb shell dumpsys activity -h. can provide <comp_spec> parameter, adb shell dumpsys activity <comp_spec>. when give <comp_spec> parameter, more info on specific component, including visible fragments , views.

example when android device settings displayed:

$ adb shell dumpsys activity com.android.settings

on device, command output contains:

... active fragments in 13c3a270: #0: dashboardsummary{186a79e9 #0 id=0x7f0e017b} mfragmentid=#7f0e017b mcontainerid=#7f0e017b mtag=null mstate=5 mindex=0 mwho=android:fragment:0 mbackstacknesting=0 madded=true mremoving=false mresumed=true mfromlayout=false minlayout=false mhidden=false mdetached=false mmenuvisible=true mhasmenu=false mretaininstance=false mretaining=false muservisiblehint=true mfragmentmanager=fragmentmanager{13c3a270 in settings{ef6d7d6}} mactivity=com.android.settings.settings@ef6d7d6 mcontainer=android.widget.framelayout{9b1166e v.e..... ........ 0,0-768,1022 #7f0e017b app:id/main_content} mview=android.widget.scrollview{1c50410f vfed.v.. ........ 0,0-768,1022 #7f0e005a app:id/dashboard} kid fragmentmanager{2298759c in dashboardsummary{186a79e9}}: fragmentmanager misc state: mactivity=com.android.settings.settings@ef6d7d6 mcontainer=android.app.fragment$1@167cba5 mparent=dashboardsummary{186a79e9 #0 id=0x7f0e017b} mcurstate=5 mstatesaved=false mdestroyed=false ...

android fragment dumpsys

No comments:

Post a Comment