// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/util/Utils.java
// public class Utils {
//     public static float convertPixelsToDp(float px) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float dp = px / (metrics.densityDpi / 160f);
//         return Math.round(dp);
//     }
// 
//     public static float convertDpToPixel(float dp) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float px = dp * (metrics.densityDpi / 160f);
//         return Math.round(px);
//     }
// 
//     public static int adjustAlpha(int color, int alpha) {
//         int red = Color.red(color);
//         int green = Color.green(color);
//         int blue = Color.blue(color);
//         return Color.argb(alpha, red, green, blue);
//     }
// }


import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.app.infideap.stylishwidget.R;
import com.app.infideap.stylishwidget.util.Utils;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.animation.ObjectAnimator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
            return 0;

        return progress.get(index).value;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }

    private void addView(Context context) {

        if (progress == null)
            return;

        removeAllViews();

        setOrientation(HORIZONTAL);

        LinearLayout progressLayout = null;
        boolean isRightAlign = isRightAlign();

        if (progressLayouts.size() > 0)
            progressLayout = progressLayouts.get(progressLayouts.size() - 1);
        for (int i = progressLayouts.size(); i < progress.size(); i++) {
            progressLayouts.add(new LinearLayout(context));
            progressLayouts.get(i).setOrientation(HORIZONTAL);

            ATextView textView = new ATextView(getContext());
            textView.setId(i);
// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/util/Utils.java
// public class Utils {
//     public static float convertPixelsToDp(float px) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float dp = px / (metrics.densityDpi / 160f);
//         return Math.round(dp);
//     }
// 
//     public static float convertDpToPixel(float dp) {
//         DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
//         float px = dp * (metrics.densityDpi / 160f);
//         return Math.round(px);
//     }
// 
//     public static int adjustAlpha(int color, int alpha) {
//         int red = Color.red(color);
//         int green = Color.green(color);
//         int blue = Color.blue(color);
//         return Color.argb(alpha, red, green, blue);
//     }
// }


// Path: stylishwidget/src/main/java/com/app/infideap/stylishwidget/view/AProgressBar.java
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.app.infideap.stylishwidget.R;
import com.app.infideap.stylishwidget.util.Utils;
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.animation.ObjectAnimator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

            return 0;

        return progress.get(index).value;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }

    private void addView(Context context) {

        if (progress == null)
            return;

        removeAllViews();

        setOrientation(HORIZONTAL);

        LinearLayout progressLayout = null;
        boolean isRightAlign = isRightAlign();

        if (progressLayouts.size() > 0)
            progressLayout = progressLayouts.get(progressLayouts.size() - 1);
        for (int i = progressLayouts.size(); i < progress.size(); i++) {
            progressLayouts.add(new LinearLayout(context));
            progressLayouts.get(i).setOrientation(HORIZONTAL);

            ATextView textView = new ATextView(getContext());
            textView.setId(i);
            int padding = (int) Utils.convertDpToPixel(16);