diff --git a/README.md b/README.md index c592fe2..6554509 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ To make gradient, you need to define it from code: ```java int[] intArray = getResources().getIntArray(R.array.progressGradientColors); -seekArc.setProgressGradient(intArray); +arcSeekBar.setProgressGradient(intArray); ``` [Here](https://github.com/MarcinMoskala/ArcSeekBar/blob/master/app/src/main/res/values/colors.xml) you can find array definition. @@ -70,8 +70,8 @@ ArcSeekBar properties are: * `enabled` is progress enabled or not (`true` by default). For disabled there is no thumb displayed. Each property can be changes pragmatically, and additionally gradient progress or background can be set using: -* `setProgressGradient` -* `setProgressBackgroundGradient` +* `setProgressGradient` e.g. `arcSeekBar.setProgressGradient(Color.GREEN, Color.BLUE, Color.YELLOW);` +* `setProgressBackgroundGradient` e.g. `arcSeekBar.setProgressBackgroundGradient(Color.GREEN, Color.BLUE, Color.YELLOW);` ## Installation diff --git a/app/src/main/java/com/marcinmoskala/arcseekbar/MainActivity.java b/app/src/main/java/com/marcinmoskala/arcseekbar/MainActivity.java index 9eea41b..e5731c5 100644 --- a/app/src/main/java/com/marcinmoskala/arcseekbar/MainActivity.java +++ b/app/src/main/java/com/marcinmoskala/arcseekbar/MainActivity.java @@ -1,5 +1,6 @@ package com.marcinmoskala.arcseekbar; +import android.graphics.Color; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; @@ -11,9 +12,9 @@ public class MainActivity extends AppCompatActivity { public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - ArcSeekBar seekArc = findViewById(R.id.seekArc); + ArcSeekBar arcSeekBar = findViewById(R.id.seekArc); - seekArc.setOnProgressChangedListener(new ProgressListener() { + arcSeekBar.setOnProgressChangedListener(new ProgressListener() { @Override public void invoke(int progress) { Log.i("SeekBar", "Value is " + progress); @@ -21,6 +22,6 @@ public void invoke(int progress) { }); int[] intArray = getResources().getIntArray(R.array.progressGradientColors); - seekArc.setProgressGradient(intArray); + arcSeekBar.setProgressGradient(intArray); } }