Initializes the view.

@param attributeSet
The attribute set, the attributes should be obtained from, as an instance of the type
{@link AttributeSet} or null, if no attributes should be obtained
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());
    }
836790
private void init(Context context, AttributeSet attrs, int defStyle) {
        // Load custom attributes
        final int layout;
        int editTextId = R.id.edit_text;
        int floatLabelId = R.id.float_label;
        final CharSequence text;
        final CharSequence hint;
        final ColorStateList hintColor;
        final int floatLabelColor;
        final int imeOptions;
        final int inputType;
        final int nextFocusDownId;
        final int nextFocusForwardId;
        final int nextFocusLeftId;
        final int nextFocusRightId;
        final int nextFocusUpId;

        if (attrs == null) {
            layout = R.layout.float_label;
            text = null;
            hint = null;
            hintColor = null;
            floatLabelColor = 0;
            imeOptions = 0;
            inputType = 0;
            nextFocusDownId = NO_ID;
            nextFocusForwardId = NO_ID;
            nextFocusLeftId = NO_ID;
            nextFocusRightId = NO_ID;
            nextFocusUpId = NO_ID;
        } else {
            final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FloatLabel, defStyle, 0);

            // Main attributes
            layout = a.getResourceId(R.styleable.FloatLabel_android_layout, R.layout.float_label);
            editTextId = a.getResourceId(R.styleable.FloatLabel_editTextId, R.id.edit_text);
            floatLabelId = a.getResourceId(R.styleable.FloatLabel_labelId, R.id.float_label);
            text = a.getText(R.styleable.FloatLabel_android_text);
            hint = a.getText(R.styleable.FloatLabel_android_hint);
            hintColor = a.getColorStateList(R.styleable.FloatLabel_android_textColorHint);
            floatLabelColor = a.getColor(R.styleable.FloatLabel_floatLabelColor, 0);
            imeOptions = a.getInt(R.styleable.FloatLabel_android_imeOptions, 0);
            inputType = a.getInt(R.styleable.FloatLabel_android_inputType, InputType.TYPE_CLASS_TEXT);

            // Next focus views
            nextFocusDownId = a.getResourceId(R.styleable.FloatLabel_android_nextFocusDown, NO_ID);
            nextFocusForwardId = a.getResourceId(R.styleable.FloatLabel_android_nextFocusForward, NO_ID);
            nextFocusLeftId = a.getResourceId(R.styleable.FloatLabel_android_nextFocusLeft, NO_ID);
            nextFocusRightId = a.getResourceId(R.styleable.FloatLabel_android_nextFocusRight, NO_ID);
            nextFocusUpId = a.getResourceId(R.styleable.FloatLabel_android_nextFocusUp, NO_ID);

            // Done with TypedArray
            a.recycle();
        }

        inflate(context, layout, this);
        mEditText = (EditText) findViewById(editTextId);
        if (mEditText == null) {
            // fallback to default value
            mEditText = (EditText) findViewById(R.id.edit_text);
        }
        if (mEditText == null) {
            throw new RuntimeException(
                    "Your layout must have an EditText whose ID is @id/edit_text");
        }
        if (editTextId != R.id.edit_text) {
            mEditText.setId(editTextId);
        }
        mEditText.setHint(hint);
        mEditText.setText(text);
        if (hintColor != null) {
            mEditText.setHintTextColor(hintColor);
        }
        if (imeOptions != 0) {
            mEditText.setImeOptions(imeOptions);
        }
        if (inputType != 0) {
            mEditText.setInputType(inputType);
        }
        // Set all next focus views
        mEditText.setNextFocusDownId(nextFocusDownId);
        mEditText.setNextFocusForwardId(nextFocusForwardId);
        mEditText.setNextFocusLeftId(nextFocusLeftId);
        mEditText.setNextFocusRightId(nextFocusRightId);
        mEditText.setNextFocusUpId(nextFocusUpId);

        // Set up the label view
        mLabel = (TextView) findViewById(floatLabelId);
        if (mLabel == null) {
            // fallback to default value
            mLabel = (TextView) findViewById(R.id.float_label);
        }
        if (mLabel == null) {
            throw new RuntimeException(
                    "Your layout must have a TextView whose ID is @id/float_label");
        }
        if (floatLabelId != R.id.float_label) {
            mLabel.setId(floatLabelId);
        }
        mLabel.setText(mEditText.getHint());
        if (floatLabelColor != 0)
            mLabel.setTextColor(floatLabelColor);

        // Listen to EditText to know when it is empty or nonempty
        mEditText.addTextChangedListener(new EditTextWatcher());

        // Check current state of EditText
        if (mEditText.getText().length() == 0) {
            mLabel.setAlpha(0);
            mLabelShowing = false;
        } else {
            mLabel.setVisibility(View.VISIBLE);
            mLabelShowing = true;
        }

        // Mark init as complete to prevent accidentally breaking the view by
        // adding children
        mInitComplete = true;
    }
466240
public void setAttributeList (AttributeList atts)
    {
    int count = atts.getLength();

    clear();

    for (int i = 0; i < count; i++) {
        addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
    }
    }
1107483
public void setAttributes(java.util.Collection<AccountAttribute> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<AccountAttribute>(attributes);
    }
24077
public final void addAttributes(final Map<String,String> attributes) {
        if(attributes != null) {
            this.attributes.putAll(attributes);
        }
    }
85598
public void setAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions) {
        if (attributeDefinitions == null) {
            this.attributeDefinitions = null;
            return;
        }

        this.attributeDefinitions = new java.util.ArrayList<AttributeDefinition>(attributeDefinitions);
    }
816907
protected void addAttributes(final String... attributes) {
        setAttributes(Stream.of(attributes).collect(Collectors.toList()));
    }
560713
public void setConfigurationSets(java.util.Collection<ConfigurationSet> configurationSets) {
        if (configurationSets == null) {
            this.configurationSets = null;
            return;
        }

        this.configurationSets = new com.amazonaws.internal.SdkInternalList<ConfigurationSet>(configurationSets);
    }
958798
public final void setAttribute(@NonNull String newAttribute) {
        searcher.removeFacet(attribute).addFacet(newAttribute);
        updateRefinementWithNewName(newAttribute);
        attribute = newAttribute;
    }
1076973
protected function initAttributes() {
		$vars = get_object_vars($this->_xml->attributes());
			
		$this->_attributes = empty($vars) ? [] : $vars['@attributes'];
	}
1249188
public void setUserAttributes(java.util.Collection<Attribute> userAttributes) {
        if (userAttributes == null) {
            this.userAttributes = null;
            return;
        }

        this.userAttributes = new java.util.ArrayList<Attribute>(userAttributes);
    }
613693
public void setAttributes(Map<String, ?> attributes) {
        if (attributes == null) {
            attributes = new HashMap<>();
        }

        this.attributes.clear();
        this.attributes.putAll(attributes);
    }
775326
public void setAttributes(java.util.Collection<LoadBalancerAttribute> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<LoadBalancerAttribute>(attributes);
    }
1231142
public void setAttributes(java.util.Collection<TypedLinkAttributeDefinition> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<TypedLinkAttributeDefinition>(attributes);
    }
901941
private function initAttributes() {
    if ($this->attributes == null) {
      $this->attributes = [];
      $this->attributes['byname'] = [];
      $this->attributes['refs'] = [];

      $attributes = $this->getAttributes();
      foreach ($attributes as $attribute) {
        $this->attributes['byname'][$attribute->getName()] = $attribute;
        if ($attribute instanceof ReferenceDescription) {
          $this->attributes['refs'][] = $attribute;
        }
      }
    }
  }
681971
private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet) {
        TypedArray typedArray =
                getContext().obtainStyledAttributes(attributeSet, R.styleable.EditText);
        try {
            obtainMaxNumberOfCharacters(typedArray);
            obtainEditTextStyledAttributes(typedArray);
        } finally {
            typedArray.recycle();
        }
    }
776926
protected static function initAttributeSet()
    {
        $className = get_called_class();
        
        if (!ModelAttributes::attributesSetFor($className)) {
            ModelAttributes::setClassAttributes(
                $className,
                static::attributeSet()
            );
        }
    }