Android Open Source - circular-progress-button Stroke Gradient Drawable






From Project

Back to project page circular-progress-button.

License

The source code is released under:

MIT License

If you think the Android project circular-progress-button listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dd;
/*www . j a  v a  2s. co m*/
import android.graphics.drawable.GradientDrawable;

public class StrokeGradientDrawable {

    private int mStrokeWidth;
    private int mStrokeColor;

    private GradientDrawable mGradientDrawable;

    public StrokeGradientDrawable(GradientDrawable drawable) {
        mGradientDrawable = drawable;
    }

    public int getStrokeWidth() {
        return mStrokeWidth;
    }

    public void setStrokeWidth(int strokeWidth) {
        mStrokeWidth = strokeWidth;
        mGradientDrawable.setStroke(strokeWidth, getStrokeColor());
    }

    public int getStrokeColor() {
        return mStrokeColor;
    }

    public void setStrokeColor(int strokeColor) {
        mStrokeColor = strokeColor;
        mGradientDrawable.setStroke(getStrokeWidth(), strokeColor);
    }

    public GradientDrawable getGradientDrawable() {
        return mGradientDrawable;
    }
}




Java Source Code List

com.dd.CircularAnimatedDrawable.java
com.dd.CircularProgressButton.java
com.dd.CircularProgressDrawable.java
com.dd.MorphingAnimation.java
com.dd.OnAnimationEndListener.java
com.dd.StateManager.java
com.dd.StrokeGradientDrawable.java
com.dd.sample.MainActivity.java
com.dd.sample.Sample1Activity.java
com.dd.sample.Sample2Activity.java
com.dd.sample.Sample3Activity.java
com.dd.sample.Sample4Activity.java
com.dd.sample.Sample5Activity.java