Initializes the shadow Y-axis offset

@param attrs attributes of the XML tag that is inflating the view
343555
private void initShadowYOffset(TypedArray attrs) {
		int index = R.styleable.ActionButton_shadow_yOffset;
		if (attrs.hasValue(index)) {
			shadowYOffset = attrs.getDimension(index, shadowYOffset);
			LOGGER.trace("Initialized Action Button shadow Y-axis offset: {}", getShadowYOffset());
		}
	}
451673
private function appendAttributes(array $attrs)
    {
        foreach ($attrs as $key => $value) {
            $this->appendAttribute($key, $value);
        }
    }
1169918
private function ifStartHandler(array $attrs): void
    {
        if ($this->process_ifs > 0) {
            $this->process_ifs++;

            return;
        }

        $condition = $attrs['condition'];
        $condition = $this->substituteVars($condition, true);
        $condition = str_replace([
            ' LT ',
            ' GT ',
        ], [
            '<',
            '>',
        ], $condition);
        // Replace the first accurance only once of @fact:DATE or in any other combinations to the current fact, such as BIRT
        $condition = str_replace('@fact:', $this->fact . ':', $condition);
        $match     = [];
        $count     = preg_match_all("/@([\w:\.]+)/", $condition, $match, PREG_SET_ORDER);
        $i         = 0;
        while ($i < $count) {
            $id    = $match[$i][1];
            $value = '""';
            if ($id === 'ID') {
                if (preg_match('/0 @(.+)@/', $this->gedrec, $match)) {
                    $value = "'" . $match[1] . "'";
                }
            } elseif ($id === 'fact') {
                $value = '"' . $this->fact . '"';
            } elseif ($id === 'desc') {
                $value = '"' . addslashes($this->desc) . '"';
            } elseif ($id === 'generation') {
                $value = '"' . $this->generation . '"';
            } else {
                $temp  = explode(' ', trim($this->gedrec));
                $level = $temp[0];
                if ($level == 0) {
                    $level++;
                }
                $value = $this->getGedcomValue($id, $level, $this->gedrec);
                if (empty($value)) {
                    $level++;
                    $value = $this->getGedcomValue($id, $level, $this->gedrec);
                }
                $value = preg_replace('/^@(' . Gedcom::REGEX_XREF . ')@$/', '$1', $value);
                $value = '"' . addslashes($value) . '"';
            }
            $condition = str_replace("@$id", $value, $condition);
            $i++;
        }

        // Create an expression language with the functions used by our reports.
        $expression_provider  = new ReportExpressionLanguageProvider();
        $expression_cache     = new NullAdapter();
        $expression_language  = new ExpressionLanguage($expression_cache, [$expression_provider]);

        $ret = $expression_language->evaluate($condition);

        if (!$ret) {
            $this->process_ifs++;
        }
    }
607305
public function setAttrs($attrs)
    {
        $oldAttrs = $this->attributes;
        $oldClasses = $this->classes;

        $this->attributes = $attrs;
        $this->attributes = Generator::parseAtts($this);

        $this->attributes = array_merge($oldAttrs, $this->attributes);
        $this->classes = null;
        $this->update('classes');

        if (!empty($oldClasses) && !empty($this->classes)) {
            $this->attributes['class'] = implode(' ', array_merge($oldClasses, $this->classes));
        }
        $this->classes = null;

        if (!empty($oldAttrs['style']) && !empty($this->attributes['style'])) {
            $this->attributes['style'] = Generator::mergeStyles($this->attributes['style'], $oldAttrs['style']);
        }

        $this->update();
    }
772165
private void init(Context context, AttributeSet attrs){
        setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {
                superOldProgress = seekBar.getProgress();
            }

            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                if(fromUser)
                    fromUserCount+=1;
            }

            @Override
            public void onStopTrackingTouch(final SeekBar seekBar) {
                int oldProgress = seekBar.getProgress();
                final int newProgress;
                if((oldProgress % stepSize) >= stepSize/2F){
                    newProgress = (int)(((oldProgress/(int)stepSize)+1)*stepSize);
                } else {
                    newProgress = (int)(((oldProgress/(int)stepSize))*stepSize);
                }

                if(fromUserCount>1){ // SeekBar Dragged
                    ObjectAnimator animation = ObjectAnimator.ofInt(seekBar, PROGRESS_PROPERTY, oldProgress, newProgress);
                    animation.setDuration(getResources().getInteger(android.R.integer.config_mediumAnimTime));
                    animation.setInterpolator(new DecelerateInterpolator());
                    animation.start();
                } else { // SeekBar Clicked
                    ObjectAnimator animation = ObjectAnimator.ofInt(seekBar, PROGRESS_PROPERTY, superOldProgress, newProgress);
                    animation.setDuration(getResources().getInteger(android.R.integer.config_mediumAnimTime));
                    animation.setInterpolator(new DecelerateInterpolator());
                    animation.start();
                }

                fromUserCount = 0;
                if(onDiscreteSeekBarChangeListener != null){
                    onDiscreteSeekBarChangeListener.onPositionChanged(newProgress/MULTIPLIER);
                }
            }
        });
    }
1093534
private void initShadowRadius(TypedArray attrs) {
		int index = R.styleable.ActionButton_shadow_radius;
		if (attrs.hasValue(index)) {
			shadowRadius = attrs.getDimension(index, shadowRadius);
			LOGGER.trace("Initialized Action Button shadow radius: {}", getShadowRadius());
		}
	}
769183
private void setAttrValue(final AttrName _attrName,
                              final String _value)
    {
        synchronized (this.attrValues) {
            this.attrValues.put(_attrName, _value);
        }
    }
203606
function _setAttributes(el, attrs) {
  Object.keys(attrs).forEach((key) => {
    el.setAttribute(key, attrs[key]);
  });
}
1326775
public void addAttributes(Attributes atts) throws SAXException
    {

        int nAtts = atts.getLength();

        for (int i = 0; i < nAtts; i++)
        {
            String uri = atts.getURI(i);

            if (null == uri)
                uri = "";

            addAttributeAlways(
                uri,
                atts.getLocalName(i),
                atts.getQName(i),
                atts.getType(i),
                atts.getValue(i),
                false);

        }
    }
1171251
function(attr) {
        var el = this.getEl();
        var val = Y.Dom.getStyle(el, attr);

        if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
            return parseFloat(val);
        }
        
        var a = this.patterns.offsetAttribute.exec(attr) || [];
        var pos = !!( a[3] ); // top or left
        var box = !!( a[2] ); // width or height
        
        if ('style' in el) {
            // use offsets for width/height and abs pos top/left
            if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
                val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
            } else { // default to zero for other 'auto'
                val = 0;
            }
        } else if (attr in el) {
            val = el[attr];
        }

        return val;
    }
328752
function (attrs) {
            var carousel = this;

            attrs = attrs || {};
            Carousel.superclass.initAttributes.call(carousel, attrs);

            /**
             * @attribute carouselEl
             * @description The type of the Carousel element.
             * @default OL
             * @type Boolean
             */
            carousel.setAttributeConfig("carouselEl", {
                    validator : JS.isString,
                    value     : attrs.carouselEl || "OL"
            });

            /**
             * @attribute carouselItemEl
             * @description The type of the list of items within the Carousel.
             * @default LI
             * @type Boolean
             */
            carousel.setAttributeConfig("carouselItemEl", {
                    validator : JS.isString,
                    value     : attrs.carouselItemEl || "LI"
            });

            /**
             * @attribute currentPage
             * @description The current page number (read-only.)
             * @type Number
             */
            carousel.setAttributeConfig("currentPage", {
                    readOnly : true,
                    value    : 0
            });

            /**
             * @attribute firstVisible
             * @description The index to start the Carousel from (indexes begin
             * from zero)
             * @default 0
             * @type Number
             */
            carousel.setAttributeConfig("firstVisible", {
                    method    : carousel._setFirstVisible,
                    validator : carousel._validateFirstVisible,
                    value     :
                        attrs.firstVisible || carousel.CONFIG.FIRST_VISIBLE
            });

            /**
             * @attribute selectOnScroll
             * @description Set this to true to automatically set focus to
             * follow scrolling in the Carousel.
             * @default true
             * @type Boolean
             */
            carousel.setAttributeConfig("selectOnScroll", {
                    validator : JS.isBoolean,
                    value     : attrs.selectOnScroll || true
            });

            /**
             * @attribute numVisible
             * @description The number of visible items in the Carousel's
             * viewport.
             * @default 3
             * @type Number
             */
            carousel.setAttributeConfig("numVisible", {
                    setter    : carousel._numVisibleSetter,
                    method    : carousel._setNumVisible,
                    validator : carousel._validateNumVisible,
                    value     : attrs.numVisible || carousel.CONFIG.NUM_VISIBLE
            });

            /**
             * @attribute numItems
             * @description The number of items in the Carousel.
             * @type Number
             */
            carousel.setAttributeConfig("numItems", {
                    method    : carousel._setNumItems,
                    validator : carousel._validateNumItems,
                    value     : carousel._itemsTable.numItems
            });

            /**
             * @attribute scrollIncrement
             * @description The number of items to scroll by for arrow keys.
             * @default 1
             * @type Number
             */
            carousel.setAttributeConfig("scrollIncrement", {
                    validator : carousel._validateScrollIncrement,
                    value     : attrs.scrollIncrement || 1
            });

            /**
             * @attribute selectedItem
             * @description The index of the selected item.
             * @type Number
             */
            carousel.setAttributeConfig("selectedItem", {
                    setter    : carousel._selectedItemSetter,
                    method    : carousel._setSelectedItem,
                    validator : JS.isNumber,
                    value     : -1
            });

            /**
             * @attribute revealAmount
             * @description The percentage of the item to be revealed on each
             * side of the Carousel (before and after the first and last item
             * in the Carousel's viewport.)
             * @default 0
             * @type Number
             */
            carousel.setAttributeConfig("revealAmount", {
                    method    : carousel._setRevealAmount,
                    validator : carousel._validateRevealAmount,
                    value     : attrs.revealAmount || 0
            });

            /**
             * @attribute isCircular
             * @description Set this to true to wrap scrolling of the contents
             * in the Carousel.
             * @default false
             * @type Boolean
             */
            carousel.setAttributeConfig("isCircular", {
                    validator : JS.isBoolean,
                    value     : attrs.isCircular || false
            });

            /**
             * @attribute isVertical
             * @description True if the orientation of the Carousel is vertical
             * @default false
             * @type Boolean
             */
            carousel.setAttributeConfig("isVertical", {
                    method    : carousel._setOrientation,
                    validator : JS.isBoolean,
                    value     : attrs.isVertical || false
            });

            /**
             * @attribute navigation
             * @description The set of navigation controls for Carousel
             * @default <br>
             * { prev: null, // the previous navigation element<br>
             *   next: null } // the next navigation element
             * @type Object
             */
            carousel.setAttributeConfig("navigation", {
                    method    : carousel._setNavigation,
                    validator : carousel._validateNavigation,
                    value     :
                        attrs.navigation || {prev: null,next: null,page: null}
            });

            /**
             * @attribute animation
             * @description The optional animation attributes for the Carousel.
             * @default <br>
             * { speed: 0, // the animation speed (in seconds)<br>
             *   effect: null } // the animation effect (like
             *   YAHOO.util.Easing.easeOut)
             * @type Object
             */
            carousel.setAttributeConfig("animation", {
                    validator : carousel._validateAnimation,
                    value     : attrs.animation || { speed: 0, effect: null }
            });

            /**
             * @attribute autoPlay
             * @description Set this to time in milli-seconds to have the
             * Carousel automatically scroll the contents.
             * @type Number
             * @deprecated Use autoPlayInterval instead.
             */
            carousel.setAttributeConfig("autoPlay", {
                    validator : JS.isNumber,
                    value     : attrs.autoPlay || 0
            });

            /**
             * @attribute autoPlayInterval
             * @description The delay in milli-seconds for scrolling the
             * Carousel during auto-play.
             * Note: The startAutoPlay() method needs to be invoked to trigger
             * automatic scrolling of Carousel.
             * @type Number
             */
            carousel.setAttributeConfig("autoPlayInterval", {
                    validator : JS.isNumber,
                    value     : attrs.autoPlayInterval || 0
            });

            /**
             * @attribute numPages
             * @description The number of pages in the carousel.
             * @type Number
             */
            carousel.setAttributeConfig("numPages", {
                    readOnly  : true,
                    getter    : carousel._getNumPages
            });

            /**
             * @attribute lastVisible
             * @description The last item visible in the carousel.
             * @type Number
             */
            carousel.setAttributeConfig("lastVisible", {
                    readOnly  : true,
                    getter    : carousel._getLastVisible
            });
        }
1083261
function(attrMap) {
        if (this._setAttrs) { // use Attribute imple
            this._setAttrs(attrMap);
        } else { // use setters inline
            Y.Object.each(attrMap, function(v, n) {
                this.set(n, v); 
            }, this);
        }

        return this;
    }
807913
private void initHideAnimation(TypedArray attrs) {
		int index = R.styleable.ActionButton_hide_animation;
		if (attrs.hasValue(index)) {
			int animResId = attrs.getResourceId(index, Animations.NONE.animResId);
			hideAnimation = Animations.load(getContext(), animResId);
			LOGGER.trace("Initialized Action Button hide animation");
		}
	}
219835
protected void setPropertiesFromAttributes(AttributeSet attr)
    {
        if (attr != null)
        {
            Font newFont = (Font) attr.getAttribute(Constants.ATTRIBUTE_FONT);
            if (newFont != null)
            {
                setFont(newFont);
            }
            else
            {
                // the font is the most important for us
                throw new IllegalStateException("Font can not be null !");
            }

            setForeground((Color) attr.getAttribute(Constants.ATTRIBUTE_FOREGROUND));
            setFontVariant((String) attr.getAttribute(Constants.ATTRIBUTE_FONT_VARIANT));

            @SuppressWarnings("unchecked")
            List<TextDecoration> attribute = (List<TextDecoration>) attr.getAttribute(Constants.ATTRIBUTE_TEXT_DECORATION);
            setTextDecoration(attribute);
        }
    }
460239
public void setAttributes(java.util.Collection<Attribute> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<Attribute>(attributes);
    }
768325
private void initialize(@Nullable final AttributeSet attributeSet) {
        constraints = new ArrayList<>();
        helperTexts = new ArrayList<>();
        helperTextColors = new ArrayList<>();
        regularHelperText = getHelperText();
        regularHelperTextColor = getHelperTextColor();
        obtainStyledAttributes(attributeSet);
        setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
        getView().addTextChangedListener(createTextChangeListener());
    }
1210726
private void init(Context context, AttributeSet attrs, int defStyle) {
    // Attribute initialization
    final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ProgressButton, defStyle,
        R.style.ProgressButton_Pin_Compat);
    final Resources res = getResources();

    mProgress = a.getInteger(R.styleable.ProgressButton_progress, mProgress);
    mMax = a.getInteger(R.styleable.ProgressButton_max, mMax);

    int circleColor = res.getColor(R.color.progress_default_circle_color);
    circleColor = a.getColor(R.styleable.ProgressButton_circleColor, circleColor);
    int progressColor = res.getColor(R.color.progress_default_progress_color);
    progressColor = a.getColor(R.styleable.ProgressButton_progressColor, progressColor);

    int pinnedDrawable =
        a.getResourceId(R.styleable.ProgressButton_pinnedDrawable, R.drawable.pin_progress_pinned);
    mPinnedDrawable = res.getDrawable(pinnedDrawable);
    mPinnedDrawable.setCallback(this);

    int unpinnedDrawable = a.getResourceId(R.styleable.ProgressButton_unpinnedDrawable,
        R.drawable.pin_progress_unpinned);
    mUnpinnedDrawable = res.getDrawable(unpinnedDrawable);
    mUnpinnedDrawable.setCallback(this);

    int shadowDrawable =
        a.getResourceId(R.styleable.ProgressButton_shadowDrawable, R.drawable.pin_progress_shadow);
    mShadowDrawable = res.getDrawable(shadowDrawable);
    mShadowDrawable.setCallback(this);

    mInnerSize = res.getDimensionPixelSize(R.dimen.progress_inner_size);
    mInnerSize = a.getDimensionPixelSize(R.styleable.ProgressButton_innerSize, mInnerSize);

    setChecked(a.getBoolean(R.styleable.ProgressButton_pinned, false));
    setClickable(a.getBoolean(R.styleable.ProgressButton_android_clickable, false));
    setFocusable(a.getBoolean(R.styleable.ProgressButton_android_focusable, false));
    setBackgroundDrawable(a.getDrawable(R.styleable.ProgressButton_android_background));

    mAnimating = a.getBoolean(R.styleable.ProgressButton_animating, mAnimating);
    mAnimationSpeed = a.getInteger(R.styleable.ProgressButton_animationSpeed, mAnimationSpeed);
    mAnimationDelay = a.getInteger(R.styleable.ProgressButton_animationDelay, mAnimationDelay);
    mAnimationStripWidth =
        a.getInteger(R.styleable.ProgressButton_animationStripWidth, mAnimationStripWidth);

    a.recycle();

    mDrawableSize = mShadowDrawable.getIntrinsicWidth();

    mCirclePaint = new Paint();
    mCirclePaint.setColor(circleColor);
    mCirclePaint.setAntiAlias(true);

    mProgressPaint = new Paint();
    mProgressPaint.setColor(progressColor);
    mProgressPaint.setAntiAlias(true);

    if (mAnimating) {
      startAnimating();
    }
  }