Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eralpyucel authored Dec 11, 2016
1 parent 0def0e6 commit ea750e1
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# CircleProgressView
An Android component to show progress in percentage.

####Screenshots:
![](https://github.com/eralpyucel/CircleProgressView/blob/master/preview.gif)
<img src="https://github.com/eralpyucel/CircleProgressView/blob/master/preview_image.png" width="300">

##Sample
###XML:
```xml
<com.eralp.circleprogressview.CircleProgressView
android:id="@+id/circle_progress_view"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cpv_circle_color="#27375c"
app:cpv_circle_width="6dp"
app:cpv_background_circle_width="1dp"
app:cpv_background_circle_color="#5b253048"
app:cpv_text_prefix="%"
app:cpv_text_size="40"
app:cpv_text_color="#27375c"/>
```

###Activity:
```java
mCircleProgressView = (CircleProgressView) findViewById(R.id.circle_progress_view);
mCircleProgressView.setTextEnabled(false);
mCircleProgressView.setInterpolator(new AccelerateDecelerateInterpolator());
mCircleProgressView.setStartAngle(45);
mCircleProgressView.setProgressWithAnimation(85, 2000);

mCircleProgressView.addAnimationListener(new ProgressAnimationListener() {
@Override
public void onValueChanged(float value) {

}

@Override
public void onAnimationEnd() {
Toast.makeText(MainActivity.this, "Animation of CircleProgressView done", Toast.LENGTH_SHORT).show();
}
});

```

0 comments on commit ea750e1

Please sign in to comment.