Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
Use new initializer API in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jasta committed Jul 21, 2015
1 parent ba6d186 commit 12ad76d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Expand Up @@ -52,11 +52,7 @@ which occurs in your `Application` class:
public class MyApplication extends Application {
public void onCreate() {
super.onCreate();
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());
Stetho.initializeWithDefaults(this);
}
}
```
Expand Down Expand Up @@ -94,7 +90,15 @@ step as such:

```java
Stetho.initialize(Stetho.newInitializerBuilder(context)
.enableDumpapp(new MyDumperPluginsProvider(context))
.enableDumpapp(new DumperPluginsProvider() {
@Override
public Iterable<DumperPlugin> get() {
return new Stetho.DefaultDumperPluginsBuilder(context)
.provide(new MyDumperPlugin())
.build();
}
})
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(context))
.build())

private static class MyDumperPluginsProvider implements DumperPluginsProvider {
Expand Down

0 comments on commit 12ad76d

Please sign in to comment.