Search in sources :

Example 1 with StrokeView

use of carbon.view.StrokeView in project Carbon by ZieIony.

the class Carbon method initStroke.

public static void initStroke(StrokeView strokeView, TypedArray a, int[] ids) {
    int carbon_stroke = ids[0];
    int carbon_strokeWidth = ids[1];
    View view = (View) strokeView;
    ColorStateList color = getDefaultColorStateList(view, a, carbon_stroke);
    if (color == null)
        color = a.getColorStateList(carbon_stroke);
    if (color != null)
        strokeView.setStroke(AnimatedColorStateList.fromList(color, animation -> view.postInvalidate()));
    strokeView.setStrokeWidth(a.getDimension(carbon_strokeWidth, 0));
}
Also used : ColorStateList(android.content.res.ColorStateList) AnimatedColorStateList(carbon.animation.AnimatedColorStateList) TintedView(carbon.view.TintedView) ShadowView(carbon.view.ShadowView) StrokeView(carbon.view.StrokeView) View(android.view.View) RippleView(carbon.drawable.ripple.RippleView) RevealView(carbon.view.RevealView) AutoSizeTextView(carbon.view.AutoSizeTextView) InsetView(carbon.view.InsetView) AnimatedView(carbon.animation.AnimatedView) ShapeModelView(carbon.view.ShapeModelView) MaxSizeView(carbon.view.MaxSizeView) TouchMarginView(carbon.view.TouchMarginView) TextAppearanceView(carbon.view.TextAppearanceView) StateAnimatorView(carbon.view.StateAnimatorView)

Aggregations

ColorStateList (android.content.res.ColorStateList)1 View (android.view.View)1 AnimatedColorStateList (carbon.animation.AnimatedColorStateList)1 AnimatedView (carbon.animation.AnimatedView)1 RippleView (carbon.drawable.ripple.RippleView)1 AutoSizeTextView (carbon.view.AutoSizeTextView)1 InsetView (carbon.view.InsetView)1 MaxSizeView (carbon.view.MaxSizeView)1 RevealView (carbon.view.RevealView)1 ShadowView (carbon.view.ShadowView)1 ShapeModelView (carbon.view.ShapeModelView)1 StateAnimatorView (carbon.view.StateAnimatorView)1 StrokeView (carbon.view.StrokeView)1 TextAppearanceView (carbon.view.TextAppearanceView)1 TintedView (carbon.view.TintedView)1 TouchMarginView (carbon.view.TouchMarginView)1