private void initAttrs(Context context, Resources resources, boolean notEdit, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AbsSeekBar,
                defStyleAttr, defStyleRes);

        // Values
        int max = a.getInteger(R.styleable.AbsSeekBar_gMax, mMax);
        int min = a.getInteger(R.styleable.AbsSeekBar_gMin, mMin);
        int value = a.getInteger(R.styleable.AbsSeekBar_gValue, mValue);

        mMin = min;
        mMax = Math.max(min + 1, max);
        mValue = Math.max(min, Math.min(max, value));

        // Colors
        ColorStateList trackColor = a.getColorStateList(R.styleable.AbsSeekBar_gTrackColor);
        ColorStateList thumbColor = a.getColorStateList(R.styleable.AbsSeekBar_gThumbColor);
        ColorStateList scrubberColor = a.getColorStateList(R.styleable.AbsSeekBar_gScrubberColor);
        ColorStateList rippleColor = a.getColorStateList(R.styleable.AbsSeekBar_gRippleColor);
        ColorStateList indicatorColor = a.getColorStateList(R.styleable.AbsSeekBar_gIndicatorBackgroundColor);

        // Size
        int tickSize = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gTickSize,
                resources.getDimensionPixelSize(R.dimen.g_seekBar_tickSize));
        int thumbSize = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gThumbSize,
                resources.getDimensionPixelSize(R.dimen.g_seekBar_thumbSize));
        int touchSize = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gTouchSize,
                resources.getDimensionPixelSize(R.dimen.g_seekBar_touchSize));
        int trackStroke = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gTrackStroke,
                resources.getDimensionPixelSize(R.dimen.g_seekBar_trackStroke));
        int scrubberStroke = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gScrubberStroke,
                resources.getDimensionPixelSize(R.dimen.g_seekBar_scrubberStroke));

        // Other
        int indicator = a.getInt(R.styleable.AbsSeekBar_gIndicator, 1);

        mMirrorForRtl = a.getBoolean(R.styleable.AbsSeekBar_gMirrorForRtl, mMirrorForRtl);
        mAllowTrackClick = a.getBoolean(R.styleable.AbsSeekBar_gAllowTrackClickToDrag, mAllowTrackClick);
        mIndicatorFormatter = a.getString(R.styleable.AbsSeekBar_gIndicatorFormatter);

        // Indicator TextAppearance
        int textPadding = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gIndicatorTextPadding,
                resources.getDimensionPixelSize(R.dimen.g_balloonMarker_textPadding));
        int textAppearanceId = a.getResourceId(R.styleable.AbsSeekBar_gIndicatorTextAppearance, R.style.Genius_Widget_BalloonMarker_TextAppearance);
        String fontFile = a.getString(R.styleable.AbsSeekBar_gFont);
        int separation = a.getDimensionPixelSize(R.styleable.AbsSeekBar_gIndicatorSeparation,
                resources.getDimensionPixelSize(R.dimen.g_balloonMarker_separation));
        a.recycle();

        // Set Size
        mSeekBarDrawable.setTrackStroke(trackStroke);
        mSeekBarDrawable.setScrubberStroke(scrubberStroke);
        mSeekBarDrawable.setTouchRadius(touchSize);
        mSeekBarDrawable.setTickRadius(tickSize);
        mSeekBarDrawable.setThumbRadius(thumbSize);

        // Set Colors
        if (rippleColor != null)
            mRipple.setColorStateList(rippleColor);
        if (trackColor != null)
            mSeekBarDrawable.setTrackColor(trackColor);
        if (thumbColor != null)
            mSeekBarDrawable.setThumbColor(thumbColor);
        if (scrubberColor != null)
            mSeekBarDrawable.setScrubberColor(scrubberColor);

        if (notEdit && indicator != 0) {
            mIndicator = new PopupIndicator(context);
            mIndicator.setListener(mFloaterListener);
            if (indicatorColor != null)
                mIndicator.setIndicatorColor(indicatorColor);
            mIndicator.setIndicatorTextAppearance(textAppearanceId);
            mIndicator.setIndicatorClosedSize(thumbSize * 2);
            mIndicator.setIndicatorTextPadding(textPadding);
            mIndicator.setIndicatorSeparation(separation);

            // Font
            if (fontFile != null && fontFile.length() > 0) {
                Typeface typeface = Ui.getFont(getContext(), fontFile);
                if (typeface != null) mIndicator.setTypeface(typeface);
            }
        }

        // Enabled
        setEnabled(Ui.getBoolFormAttribute(context, attrs, android.R.attr.enabled,
                defStyleAttr, defStyleRes, isEnabled()));
    }
This abstract class use to SeekBar
<p>
<p><strong>XML attributes</strong></p>
<p>
See {@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gAllowTrackClickToDrag Attributes},
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gFont Attributes},
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicator Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicatorBackgroundColor Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicatorFormatter Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicatorSeparation Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicatorTextAppearance Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gIndicatorTextPadding Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gMax Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gMin Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gMirrorForRtl Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gRippleColor Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gScrubberColor Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gScrubberStroke Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gThumbColor Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gThumbSize Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gTickSize Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gTouchSize Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gTrackStroke Attributes}
{@link net.qiujuer.genius.ui.R.styleable#AbsSeekBar_gValue Attributes}
caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/AbsSeekBar.java