-
Notifications
You must be signed in to change notification settings - Fork 344
0x03i ViewCanary_en
hui.zhao edited this page Feb 14, 2020
·
3 revisions
Use the following configuration to install
GodEye.instance().install(GodEyeConfig.defaultConfigBuilder().withViewCanaryConfig(new GodEyeConfig.ViewCanaryConfig(10)).build());
or
<viewCanary maxDepth="10"/>
maxDepth
indicates that the view exceeds the threshold value of the level (Views exceed this level will be marked in red in debug monitor)
Use the following methods to observe the output:
try {
GodEye.instance().observeModule(GodEye.ModuleName.VIEW_CANARY, new Consumer<ViewIssueInfo>() {
@Override
public void accept(ViewIssueInfo viewIssueInfo) throws Exception {
}
});
} catch (UninstallException e) {
e.printStackTrace();
}
Analysing will be started after page layout changed a lot, and it will be output after the analysis is completed. The viewIssueInfo
records all views level informations of the top page and the redraw areas in the page