diff --git a/README.md b/README.md
index bf25698..48fb72c 100644
--- a/README.md
+++ b/README.md
@@ -1,58 +1,71 @@
+
+
+
+
+
+
+
+
ArcProgressStackView
====================
Present your progress bars in arc mode with information and total control.
-[](http://devlight.com.ua)
-
-[](http://android-arsenal.com/details/1/3308)
-[](https://github.com/DevLight-Mobile-Agency)
-[](https://bintray.com/gigamole/maven/arcprogressstackview/_latestVersion)
-[](https://github.com/DevLight-Mobile-Agency/ArcProgressStackView/blob/master/LICENSE.txt)
-[](https://www.codacy.com/app/gigamole53/ArcProgressStackView?utm_source=github.com&utm_medium=referral&utm_content=DevLight-Mobile-Agency/ArcProgressStackView&utm_campaign=Badge_Grade)
+[](http://android-arsenal.com/details/1/3308)
+
+[](https://github.com/DevLight-Mobile-Agency)
+
+[](https://bintray.com/gigamole/maven/apsv/_latestVersion)
+
+[](https://github.com/DevLight-Mobile-Agency/ArcProgressStackView/blob/master/LICENSE.txt)
+
+[](https://www.codacy.com/app/gigamole53/ArcProgressStackView?utm_source=github.com&utm_medium=referral&utm_content=DevLight-Mobile-Agency/ArcProgressStackView&utm_campaign=Badge_Grade)
-| | | | | |
-:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:
-||||
+
+
+
You can check the sample app [here](https://github.com/DevLight-Mobile-Agency/ArcProgressStackView/tree/master/app).
+Warn
+====
+```
+This library is not more supported.
+If you want to add new feature or fix a bug, grab source code and do it.
+If you think your fix or feature would be useful to other developers,
+I can add link of your repository to this README file.
+Thank you for using our libraries.
+```
+
Download
-------------
+========
You can download a `.aar` from GitHub's [releases page](https://github.com/DevLight-Mobile-Agency/ArcProgressStackView/releases).
-Or use Gradle jCenter:
-
-```groovy
-dependencies {
- repositories {
- mavenCentral()
- maven {
- url 'http://dl.bintray.com/gigamole/maven/'
- }
- }
- compile 'com.github.gigamole.arcprogressstackview:library:+'
-}
-```
-
-Or Gradle Maven Central:
+Or use Gradle:
```groovy
-compile 'com.github.gigamole.arcprogressstackview:library:1.0.3'
+compile 'devlight.io:arcprogressstackview:1.0.4'
```
-Or Maven:
-
+Or Maven:
```xml
- com.github.gigamole.arcprogressstackview
- library
- 1.0.3
- aar
+ devlight.io
+ arcprogressstackview
+ 1.0.4
+ pom
+
+```
+
+Or Ivy:
+```groovy
+
+
```
+
Android SDK Version
===================
@@ -65,98 +78,75 @@ Sample
For `APSV` you can set such parameters as:
- - models:
-
+ - models:
allows you to set `APSV` models, where you set title, progress and colors. Can be set up only via code.
- - animation:
-
+ - animation:
allows you to animate progress with func call or with touch event.
- - shadow:
-
+ - shadow:
allows you to add shadow to your progress models, but remember, the shadow need `LAYER_TYPE_SOFTWARE`, so it decrease FPS.
- - round corners:
-
+ - round corners:
allows you to set round corners to models.
- - drag/seek:
-
+ - drag/seek:
allows you to make your progress model seek like.
- - typeface:
-
+ - typeface:
allows you to set custom typeface.
- - text color:
-
+ - text color:
allows you to set text(title and progress indicator) color.
- - shadow distance:
-
+ - shadow distance:
allows you to set shadow distance.
- - shadow angle:
-
+ - shadow angle:
allows you to set shadow angle.
- - shadow radius:
-
+ - shadow radius:
allows you to set shadow radius.
- - shadow color:
-
+ - shadow color:
allows you to set shadow color.
- - animation duration:
-
+ - animation duration:
allows you to set animation duration.
- - animation listener:
-
+ - animation listener:
allows you to set animation listener.
- - interpolator:
-
+ - interpolator:
allows you to set interpolator to animation.
- - draw width:
-
+ - draw width:
allows you to set draw width in fraction mode(e.g. 55%) or dimension mode.
- - model offset:
-
+ - model offset:
allows you to set model offset(positive or negative).
- - model background:
-
+ - model background:
allows you to set model background track from start angle to sweep angle.
- - start angle:
-
+ - start angle:
allows you to set start angle of models.
- - sweep angle:
-
+ - sweep angle:
allows you to set sweep angle of models.
- - progress indicator orientation:
-
+ - progress indicator orientation:
allows you to set progress indicator orientation.
- - preview colors:
-
+ - preview colors:
allows you to set preview colors, which generate count of models equals to count of colors.
- - preview background:
-
+ - preview background:
allows you to set models background preview color.
Tips
-All angle variables can only be positive and be in range from 0 to 360 degrees.
-
+All angle variables can only be positive and be in range from 0 to 360 degrees.
The size of `View` automatically set up in square mode.
Init
@@ -176,17 +166,17 @@ arcProgressStackView.setModels(models);
Other methods check out in sample.
-And XML init:
+And `XML` init:
```xml
-
-
+
-
+
-
+
+
+
diff --git a/app/src/main/java/com/gigamole/arcprogressstackview/MainActivity.java b/app/src/main/java/devlight/io/sample/MainActivity.java
similarity index 91%
rename from app/src/main/java/com/gigamole/arcprogressstackview/MainActivity.java
rename to app/src/main/java/devlight/io/sample/MainActivity.java
index 3abd812..0fc4bd3 100644
--- a/app/src/main/java/com/gigamole/arcprogressstackview/MainActivity.java
+++ b/app/src/main/java/devlight/io/sample/MainActivity.java
@@ -1,8 +1,9 @@
-package com.gigamole.arcprogressstackview;
+package devlight.io.sample;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
@@ -17,11 +18,12 @@
import com.commonsware.cwac.colormixer.ColorMixer;
import com.commonsware.cwac.colormixer.ColorMixerDialog;
-import com.gigamole.library.ArcProgressStackView;
import java.util.ArrayList;
import java.util.Random;
+import devlight.io.library.ArcProgressStackView;
+
public class MainActivity extends AppCompatActivity implements
View.OnClickListener,
CompoundButton.OnCheckedChangeListener,
@@ -59,7 +61,7 @@ private void init() {
mArcProgressStackView = (ArcProgressStackView) findViewById(R.id.apsv);
// Get colors
- final String[] startColors = getResources().getStringArray(R.array.polluted_waves);
+ final String[] startColors = getResources().getStringArray(R.array.devlight);
final String[] endColors = getResources().getStringArray(R.array.default_preview);
final String[] bgColors = getResources().getStringArray(R.array.medical_express);
@@ -71,10 +73,10 @@ private void init() {
// Set models
final ArrayList models = new ArrayList<>();
- models.add(new ArcProgressStackView.Model("Circle", 0, Color.parseColor(bgColors[0]), mStartColors[0]));
- models.add(new ArcProgressStackView.Model("Progress", 0, Color.parseColor(bgColors[1]), mStartColors[1]));
- models.add(new ArcProgressStackView.Model("Stack", 0, Color.parseColor(bgColors[2]), mStartColors[2]));
- models.add(new ArcProgressStackView.Model("View", 0, Color.parseColor(bgColors[3]), mStartColors[3]));
+ models.add(new ArcProgressStackView.Model("Strategy", 0, Color.parseColor(bgColors[0]), mStartColors[0]));
+ models.add(new ArcProgressStackView.Model("Design", 0, Color.parseColor(bgColors[1]), mStartColors[1]));
+ models.add(new ArcProgressStackView.Model("Development", 0, Color.parseColor(bgColors[2]), mStartColors[2]));
+ models.add(new ArcProgressStackView.Model("QA", 0, Color.parseColor(bgColors[3]), mStartColors[3]));
mArcProgressStackView.setModels(models);
// Get wrappers
@@ -86,6 +88,7 @@ private void init() {
final CheckBox cbDragging = (CheckBox) findViewById(R.id.cb_dragging);
final CheckBox cbShadowing = (CheckBox) findViewById(R.id.cb_shadowing);
final CheckBox cbRounding = (CheckBox) findViewById(R.id.cb_rounding);
+ final CheckBox cbLeveling = (CheckBox) findViewById(R.id.cb_leveling);
final CheckBox cbShowModelBg = (CheckBox) findViewById(R.id.cb_show_model_bg);
final CheckBox cbUseCustomTypeface = (CheckBox) findViewById(R.id.cb_use_custom_typeface);
final CheckBox cbUseOvershootInterpolator = (CheckBox) findViewById(R.id.cb_use_overshoot_interpolator);
@@ -98,6 +101,7 @@ private void init() {
cbShadowing.setOnCheckedChangeListener(this);
cbRounding.setOnCheckedChangeListener(this);
cbShowModelBg.setOnCheckedChangeListener(this);
+ cbLeveling.setOnCheckedChangeListener(this);
cbUseCustomTypeface.setOnCheckedChangeListener(this);
cbUseOvershootInterpolator.setOnCheckedChangeListener(this);
cbUseVerticalOrientation.setOnCheckedChangeListener(this);
@@ -107,6 +111,7 @@ private void init() {
onCheckedChanged(cbDragging, cbDragging.isChecked());
onCheckedChanged(cbShadowing, cbShadowing.isChecked());
onCheckedChanged(cbRounding, cbRounding.isChecked());
+ onCheckedChanged(cbLeveling, cbLeveling.isChecked());
onCheckedChanged(cbShowModelBg, cbShowModelBg.isChecked());
onCheckedChanged(cbUseCustomTypeface, cbUseCustomTypeface.isChecked());
onCheckedChanged(cbUseOvershootInterpolator, cbUseOvershootInterpolator.isChecked());
@@ -117,12 +122,14 @@ private void init() {
mBtnTextColor = (Button) findViewById(R.id.btn_text_color);
mBtnShadowColor = (Button) findViewById(R.id.btn_shadow_color);
final Button btnAnimate = (Button) findViewById(R.id.btn_animate);
+ final Button btnPresentation = (Button) findViewById(R.id.btn_presentation);
final Button btnReset = (Button) findViewById(R.id.btn_reset);
// Set buttons
mBtnTextColor.setOnClickListener(this);
mBtnShadowColor.setOnClickListener(this);
btnAnimate.setOnClickListener(this);
+ btnPresentation.setOnClickListener(this);
btnReset.setOnClickListener(this);
// Set default colors
@@ -187,13 +194,16 @@ public void onCheckedChanged(final CompoundButton buttonView, final boolean isCh
break;
case R.id.cb_shadowing:
mArcProgressStackView.setIsShadowed(isChecked);
- mArcProgressStackView.postInvalidate();
+ mArcProgressStackView.requestLayout();
mWrapperShadow.setVisibility(isChecked ? View.VISIBLE : View.GONE);
break;
case R.id.cb_rounding:
mArcProgressStackView.setIsRounded(isChecked);
mArcProgressStackView.postInvalidate();
break;
+ case R.id.cb_leveling:
+ mArcProgressStackView.setIsLeveled(isChecked);
+ break;
case R.id.cb_show_model_bg:
mArcProgressStackView.setModelBgEnabled(isChecked);
break;
@@ -242,6 +252,9 @@ public void onClick(final View v) {
finish();
startActivity(getIntent());
break;
+ case R.id.btn_presentation:
+ startActivity(new Intent(MainActivity.this, PresentationActivity.class));
+ break;
default:
break;
}
diff --git a/app/src/main/java/devlight/io/sample/PresentationActivity.java b/app/src/main/java/devlight/io/sample/PresentationActivity.java
new file mode 100644
index 0000000..3097d0e
--- /dev/null
+++ b/app/src/main/java/devlight/io/sample/PresentationActivity.java
@@ -0,0 +1,94 @@
+package devlight.io.sample;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ValueAnimator;
+import android.app.Activity;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.view.View;
+
+import java.util.ArrayList;
+
+import devlight.io.library.ArcProgressStackView;
+
+import static devlight.io.library.ArcProgressStackView.Model;
+import static devlight.io.sample.MainActivity.MODEL_COUNT;
+
+/**
+ * Created by GIGAMOLE on 9/21/16.
+ */
+
+public class PresentationActivity extends Activity {
+
+ private int mCounter = 0;
+
+ private ArcProgressStackView mArcProgressStackView;
+
+ @Override
+ protected void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_presentation);
+
+ mArcProgressStackView = (ArcProgressStackView) findViewById(R.id.apsv_presentation);
+ mArcProgressStackView.setShadowColor(Color.argb(200, 0, 0, 0));
+ mArcProgressStackView.setAnimationDuration(1000);
+ mArcProgressStackView.setSweepAngle(270);
+
+ final String[] stringColors = getResources().getStringArray(R.array.devlight);
+ final String[] stringBgColors = getResources().getStringArray(R.array.bg);
+
+ final int[] colors = new int[MODEL_COUNT];
+ final int[] bgColors = new int[MODEL_COUNT];
+ for (int i = 0; i < MODEL_COUNT; i++) {
+ colors[i] = Color.parseColor(stringColors[i]);
+ bgColors[i] = Color.parseColor(stringBgColors[i]);
+ }
+
+ final ArrayList models = new ArrayList<>();
+ models.add(new Model("STRATEGY", 1, bgColors[0], colors[0]));
+ models.add(new Model("DESIGN", 1, bgColors[1], colors[1]));
+ models.add(new Model("DEVELOPMENT", 1, bgColors[2], colors[2]));
+ models.add(new Model("QA", 1, bgColors[3], colors[3]));
+ mArcProgressStackView.setModels(models);
+
+ final ValueAnimator valueAnimator = ValueAnimator.ofFloat(1.0F, 105.0F);
+ valueAnimator.setDuration(800);
+ valueAnimator.setStartDelay(200);
+ valueAnimator.setRepeatMode(ValueAnimator.RESTART);
+ valueAnimator.setRepeatCount(MODEL_COUNT - 1);
+ valueAnimator.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(final Animator animation) {
+ animation.removeListener(this);
+ animation.addListener(this);
+ mCounter = 0;
+
+ for (final Model model : mArcProgressStackView.getModels()) model.setProgress(1);
+ mArcProgressStackView.animateProgress();
+ }
+
+ @Override
+ public void onAnimationRepeat(final Animator animation) {
+ mCounter++;
+ }
+ });
+ valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(final ValueAnimator animation) {
+ mArcProgressStackView.getModels().get(Math.min(mCounter, MODEL_COUNT - 1))
+ .setProgress((Float) animation.getAnimatedValue());
+ mArcProgressStackView.postInvalidate();
+ }
+ });
+
+ mArcProgressStackView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(final View v) {
+ if (valueAnimator.isRunning()) return;
+ if (mArcProgressStackView.getProgressAnimator().isRunning()) return;
+ valueAnimator.start();
+ }
+ });
+ }
+}
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 668dcba..ae0bed5 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -14,12 +14,12 @@
android:layout_height="wrap_content"
android:padding="15dp">
-
@@ -98,6 +98,20 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_presentation.xml b/app/src/main/res/layout/activity_presentation.xml
new file mode 100644
index 0000000..67dec3d
--- /dev/null
+++ b/app/src/main/res/layout/activity_presentation.xml
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 419c8f2..bfbf2cb 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -1,5 +1,20 @@
+
+
+ - #ffa50a
+ - #e08e00
+ - #b87400
+ - #8f5a00
+
+
+
+ - #64ffa50a
+ - #64e08e00
+ - #64b87400
+ - #648f5a00
+
+
- #394948
- #5a7874
@@ -13,4 +28,5 @@
- #cccccc
- #dddddd
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
deleted file mode 100644
index 3ab3e9c..0000000
--- a/app/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- #3F51B5
- #303F9F
- #FF4081
-
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 3ef9515..eac5d7f 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,7 +1,10 @@
-
+