package com.xplora.xpsettings;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;

import androidx.annotation.Nullable;

public class IconProgressView<updata> extends FrameLayout {

    public CircleProgressbar mCircleProgressbar;
    public ImageView mItemIcon;

    public IconProgressView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);

        View view = LayoutInflater.from(context).inflate(R.layout.item_icon_progress, this);
        mCircleProgressbar = view.findViewById(R.id.iconprogress_progress);
        mItemIcon = view.findViewById(R.id.iconprogress_icon);
    }

    public void setIcon(int drawable) {
        mItemIcon.setImageResource(drawable);
    }

    public void setProgress360(int progress) {
        mCircleProgressbar.setProgress360(progress);
    }

    public void setProgress100(int progress) {
        mCircleProgressbar.setProgress100(progress);
    }

    public void setProgressColor(int color) {
        mCircleProgressbar.setProgressColor(color);
    }

    public void setNormalColor(int color) {
        mCircleProgressbar.setNormalColor(color);
    }

    public void setStrokeWidth(int value) {
        mCircleProgressbar.setStrokeWidth(value);
    }
}
