Skip to content

0x03i ViewCanary_en

hui.zhao edited this page Feb 14, 2020 · 3 revisions

ViewCanary

Install

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)

Production and consumption of data

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

DebugMonitor Dashboard

android_god_eye_view_canary_static

android_god_eye_view_canary

Clone this wiki locally