A debug tool to inspect used layout files of current Activity.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Make example better Aug 19, 2017
gradle/wrapper Initial commit Jun 4, 2017
img Update README.md Aug 20, 2017
resinspector-no-op Add missing method to no-op artifact Aug 23, 2017
resinspector
.gitignore
LICENSE Add license file Jun 20, 2017
README.md Fix typo Dec 23, 2017
build.gradle
gradle.properties
gradlew Initial commit Jun 4, 2017
gradlew.bat
settings.gradle Add no-op artifact Jun 5, 2017

README.md

README

Apache 2.0 License Release

A debug tool to inspect used layout files of current Activity. This tool is helpful when you want to find out layout xml files used in current Activity from a large amount of resource files.

This tool depenends on the Stetho library. After you integrate this library to your project, you can open the Chrome's DevTools window (navigate to chrome://inspect for opening it) to inspect your current Activity.

Screenshot

You can click the Icon icon in the DevTools window to switch your Application to the search mode. And then you can click on the widget which you want to search in your Activity to quickly locate the corresponding element in the DevTools window.

(PS: To quickly expand all elements, just hold Opt and click on the arrow icon of root element.)

Getting started

In your build.gradle:

repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    debugCompile "com.github.nekocode.ResourceInspector:resinspector:${lastest-version}"
    releaseCompile "com.github.nekocode.ResourceInspector:resinspector-no-op:${lastest-version}"
    testCompile "com.github.nekocode.ResourceInspector:resinspector-no-op:${lastest-version}"

    compile "com.facebook.stetho:stetho:${stetho-lastest-version}"
}

In your Application class:

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        ResourceInspector.initialize(this);
    }
}

In your (Base) Activity class:

public class BaseActivity extends Activity {
    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(ResourceInspector.wrap(newBase));
    }
}