From 540bd465397cf363b97e8a8be5aefa36a0aec6be Mon Sep 17 00:00:00 2001 From: Thomas Vos Date: Tue, 25 Jul 2017 17:32:20 +0200 Subject: [PATCH 1/2] Added code syntax highlighting in README.md --- README.md | 75 +++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 388a8af..b639bd1 100644 --- a/README.md +++ b/README.md @@ -24,50 +24,49 @@ 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:

From bd8827996d50022c2855184a7046eb9bb10b6e14 Mon Sep 17 00:00:00 2001 From: Thomas Vos Date: Tue, 25 Jul 2017 17:38:46 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index b639bd1..3b695b5 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="64dp" android:layout_height="64dp" android:id="@+id/knob" - app:kNumberOfStates="6" -/> + app:kNumberOfStates="6" /> ``` Listener: ```java