diff --git a/README.md b/README.md index 388a8af..3b695b5 100644 --- a/README.md +++ b/README.md @@ -24,50 +24,48 @@ Possible usages are: ### Setup In your project's build.gradle file: - - allprojects { - repositories { - ... - maven { url "https://jitpack.io" } - ... - } - } - -In your Application's or Module's build.gradle file: - - dependencies { +```gradle +allprojects { + repositories { ... - compile 'com.github.BeppiMenozzi:Knob:1.9.0' + maven { url "https://jitpack.io" } ... } - -### Minimal usage -Layout: - +} +``` +In your Application's or Module's build.gradle file: +```gradle +dependencies { ... - xmlns:app="http://schemas.android.com/apk/res-auto" + compile 'com.github.BeppiMenozzi:Knob:1.9.0' ... - - +} +``` +### Minimal usage +Layout: +```xml +... +xmlns:app="http://schemas.android.com/apk/res-auto" +... + +``` Listener: - - ... - Knob knob = (Knob) findViewById(R.id.knob); - knob.setState(firstState); - knob.setOnStateChanged(new Knob.OnStateChanged() { - @Override - public void onState(int state) { - // do something - } - }); - - ... - +```java +// ... +Knob knob = (Knob) findViewById(R.id.knob); +knob.setState(firstState); +knob.setOnStateChanged(new Knob.OnStateChanged() { + @Override + public void onState(int state) { + // do something + } +}); +// ... +```
As default, nearly all features are disabled and the default knob is minimal: