android.util.AttributeSet#getAttributeIntValue ( )源码实例Demo

下面列出了android.util.AttributeSet#getAttributeIntValue ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

private void init(AttributeSet attrs, int defStyleAttr, int defStyleRes) {
    if (attrs != null) {
        final int scaleTypeIndex = attrs.getAttributeIntValue(GifViewUtils.ANDROID_NS, "scaleType", -1);
        if (scaleTypeIndex >= 0 && scaleTypeIndex < sScaleTypeArray.length) {
            mScaleType = sScaleTypeArray[scaleTypeIndex];
        }
        final TypedArray textureViewAttributes = getContext().obtainStyledAttributes(attrs, R.styleable
                .GifTextureView, defStyleAttr, defStyleRes);
        mInputSource = findSource(textureViewAttributes);
        super.setOpaque(textureViewAttributes.getBoolean(R.styleable.GifTextureView_isOpaque, false));
        textureViewAttributes.recycle();
        mFreezesAnimation = GifViewUtils.isFreezingAnimation(this, attrs, defStyleAttr, defStyleRes);
    } else {
        super.setOpaque(false);
    }
    if (!isInEditMode()) {
        mRenderThread = new RenderThread();
        if (mInputSource != null) {
            mRenderThread.start();
        }
    }
}
 
源代码2 项目: ThemeDemo   文件: DefaultViewSkinHelper.java
/**
 * 设置背景色
 * Set background Color
 */
public void init(View view, AttributeSet attrs) {
    mView = view;
    if (attrs == null) {
        mEnable = false;
        return;
    }
    mLightBackgroundRes = attrs.getAttributeResourceValue(ANDROIDXML, "background", -1);
    mDarkBackgroundRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightBackground", -1);
    if (mLightBackgroundRes == -1) {
        mLightBackgroundColor = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
    }
    if (mDarkBackgroundRes == -1) {
        mDarkBackgroundColor = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightBackground", -1);
    }
    mLightTextColorRes = attrs.getAttributeResourceValue(ANDROIDXML, "textColor", -1);
    if (mLightTextColorRes == -1) {
        mLightTextColor = attrs.getAttributeIntValue(ANDROIDXML, "textColor", -1);
    }
    mNightTextColorRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColor", -1);
    if (mNightTextColorRes == -1) {
        nightTextColor = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightTextColor", -1);
    }
}
 
private void setValuesFromXml(AttributeSet attrs) {
	mMaxValue = attrs.getAttributeIntValue(ANDROIDNS, "max", 100);
	mMinValue = attrs.getAttributeIntValue(APPLICATIONNS, "min", 0);
	
	mUnitsLeft = getAttributeStringValue(attrs, APPLICATIONNS, "unitsLeft", "");
	String units = getAttributeStringValue(attrs, APPLICATIONNS, "units", "");
	mUnitsRight = getAttributeStringValue(attrs, APPLICATIONNS, "unitsRight", units);
	
	try {
		String newInterval = attrs.getAttributeValue(APPLICATIONNS, "interval");
		if(newInterval != null)
			mInterval = Integer.parseInt(newInterval);
	}
	catch(Exception e) {
		Log.e(TAG, "Invalid interval value", e);
	}
	
}
 
源代码4 项目: ThemeDemo   文件: ViewSkinHelper.java
/**
 * 设置背景色
 * Set background Color
 */
public void init(View view, AttributeSet attrs) {

    mView = view;
    if (attrs == null) {
        mEnable = false;
        return;
    }
    mLightBackgroundRes = attrs.getAttributeResourceValue(ANDROIDXML, "background", -1);
    mDarkBackgroundRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightBackground", -1);
    if (mLightBackgroundRes == -1) {
        mLightBackgroundColor = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
    }
    if (mDarkBackgroundRes == -1) {
        mDarkBackgroundColor = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightBackground", -1);
    }

}
 
源代码5 项目: ForceDoze   文件: NumberPickerPreference.java
private void init(Context context, AttributeSet attrs) {
    setOnPreferenceClickListener(this);

    if (attrs != null) {
        int title = attrs.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "title", -1);
        if (title != -1) {
            mTitle = context.getString(title);
        }
        mBindSummary = attrs.getAttributeBooleanValue(null, "bindSummary", DEFAULT_BIND_SUMMARY);
        mMin = attrs.getAttributeIntValue(null, "min", DEFAULT_MIN);
        mMax = attrs.getAttributeIntValue(null, "max", DEFAULT_MAX);
        mStep = attrs.getAttributeIntValue(null, "step", DEFAULT_STEP);
        mCurrentValue = mMin;
    }

    if (mTitle == null) {
        mTitle = "Choose delay (minutes)";
    }
    if (mMax < mMin) {
        throw new AssertionError("max value must be > min value");
    }
    if (mStep <= 0) {
        throw new AssertionError("step value must be > 0");
    }

}
 
源代码6 项目: MaxLock   文件: SeekBarPreference.java
private void setValuesFromXml(AttributeSet attrs) {
    mMaxValue = attrs.getAttributeIntValue(ANDROID_XMLNS, "max", 100);
    mMinValue = attrs.getAttributeIntValue(SEEK_BAR_XMLNS, "min", 0);
    try {
        String newInterval = attrs.getAttributeValue(SEEK_BAR_XMLNS, "interval");
        if (newInterval != null)
            mInterval = Integer.parseInt(newInterval);
    } catch (Exception e) {
        Log.e(TAG, "Invalid interval value", e);
    }
}
 
源代码7 项目: MoeGallery   文件: ButtonFlat.java
@Override
protected void setAttributes(AttributeSet attrs) {
	// Set text button
	String text = null;
	int textResource = attrs.getAttributeResourceValue(ANDROIDXML,"text",-1);
	if(textResource != -1){
		text = getResources().getString(textResource);
	}else{
		text = attrs.getAttributeValue(ANDROIDXML,"text");
	}
	if(text != null){
		textButton = new TextView(getContext());
		textButton.setText(text.toUpperCase());
		textButton.setTextColor(backgroundColor);
		textButton.setTypeface(null, Typeface.BOLD);
		RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
		params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
		textButton.setLayoutParams(params);
		addView(textButton);
	}
	int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,"background",-1);
	if(bacgroundColor != -1){
		setBackgroundColor(getResources().getColor(bacgroundColor));
	}else{
		// Color by hexadecimal
		// Color by hexadecimal
		background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
		if (background != -1)
			setBackgroundColor(background);
	}
}
 
源代码8 项目: screenrecorder   文件: SeekBarPreference.java
public SeekBarPreference(Context context, AttributeSet attrs) {
    super(context,attrs);

    //Set the preferenceto be persistent
    setPersistent(true);

    //Set custom preferece layout
    setDialogLayoutResource(R.layout.layout_floating_control_preview);

    //Get default values from xml
    mSuffix = attrs.getAttributeValue(androidns,"text");
    mDefault = attrs.getAttributeIntValue(androidns,"defaultValue", 100);
    mMax = attrs.getAttributeIntValue(androidns,"max", 200);
}
 
源代码9 项目: XERUNG   文件: CustomView.java
/**
 * 设置背景色
 * Set background Color
 */
protected void setBackgroundAttributes(AttributeSet attrs) {
	int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,"background",-1);
	if(bacgroundColor != -1){
		setBackgroundColor(getResources().getColor(bacgroundColor));
	}else{
		// Color by hexadecimal
		int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
		if(background != -1 && !isInEditMode()) {
			setBackgroundColor(background);
		}else {
			setBackgroundColor(backgroundColor);// 如果没有设置,就用这个颜色
		}
	}
}
 
源代码10 项目: XERUNG   文件: Slider.java
@Override
protected void setAttributes(AttributeSet attrs) {
	super.setAttributes(attrs);
	if (!isInEditMode()) {
		getBackground().setAlpha(0);
	}
	showNumberIndicator = attrs.getAttributeBooleanValue(MATERIALDESIGNXML,"showNumberIndicator", false);
	min = attrs.getAttributeIntValue(MATERIALDESIGNXML, "min", 0);
	max = attrs.getAttributeIntValue(MATERIALDESIGNXML, "max", 100);// max > min
	value = attrs.getAttributeIntValue(MATERIALDESIGNXML, "value", min);

	float size = 20;
	String thumbSize = attrs.getAttributeValue(MATERIALDESIGNXML, "thumbSize");
	if (thumbSize != null) {
		size = Utils.dipOrDpToFloat(thumbSize);
	}

	ball = new Ball(getContext());
	setBallParams(size);
	addView(ball);

	// Set if slider content number indicator
	if (showNumberIndicator) {
		if (!isInEditMode()) {
			numberIndicator = new NumberIndicator(getContext());
		}
	}
}
 
源代码11 项目: XERUNG   文件: RippleView.java
protected void setRippleAttributes(AttributeSet attrs) {
	/**
	 * 初始化按压时涟漪的颜色
	 * Set Ripple Color
	 * Color by resource
	 */
	int color = attrs.getAttributeResourceValue(MATERIALDESIGNXML,"rippleColor",-1);
	if(color != -1){
		rippleColor = getResources().getColor(color);
		settedRippleColor = true;
	}else{
		// Color by hexadecimal
		int rColor = attrs.getAttributeIntValue(MATERIALDESIGNXML, "rippleColor", -1);// 16进制的颜色
		if(rColor != -1 && !isInEditMode()) {
			rippleColor = rColor;
			settedRippleColor = true;
		}
	}
	
	/**
	 * 初始化涟漪扩展的速度 
	 * init Ripple speed
	 */
	rippleSpeed = attrs.getAttributeFloatValue(MATERIALDESIGNXML, "rippleSpeed", rippleSpeed);
	
	/**
	 * 设定涟漪的响应时间
	 */
	clickAfterRipple = attrs.getAttributeBooleanValue(MATERIALDESIGNXML, "clickAfterRipple", clickAfterRipple);
}
 
源代码12 项目: XERUNG   文件: CustomView.java
/**
 * 设置背景色
 * Set background Color
 */
protected void setBackgroundAttributes(AttributeSet attrs) {
	int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,"background",-1);
	if(bacgroundColor != -1){
		setBackgroundColor(getResources().getColor(bacgroundColor));
	}else{
		// Color by hexadecimal
		int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
		if(background != -1 && !isInEditMode()) {
			setBackgroundColor(background);
		}else {
			setBackgroundColor(backgroundColor);// 如果没有设置,就用这个颜色
		}
	}
}
 
源代码13 项目: DMAudioStreamer   文件: Slider.java
protected void setAttributes(AttributeSet attrs) {

        setBackgroundResource(R.drawable.background_transparent);

        // Set size of view
        setMinimumHeight(dpToPx(48, getResources()));
        setMinimumWidth(dpToPx(80, getResources()));

        // Set background Color
        // Color by resource
        int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML, "background", -1);
        if (bacgroundColor != -1) {
            setBackgroundColor(getResources().getColor(bacgroundColor));
        } else {
            // Color by hexadecimal
            int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
            if (background != -1)
                setBackgroundColor(background);
        }

        min = attrs.getAttributeIntValue(MATERIALDESIGNXML, "min", 0);
        max = attrs.getAttributeIntValue(MATERIALDESIGNXML, "max", 0);
        value = attrs.getAttributeIntValue(MATERIALDESIGNXML, "value", min);

        ball = new Ball(getContext());
        LayoutParams params = new LayoutParams(dpToPx(15, getResources()), dpToPx(15, getResources()));
        params.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
        ball.setLayoutParams(params);
        addView(ball);

    }
 
源代码14 项目: Pimp_my_Z1   文件: CardUI.java
/**
 * Constructor
 */
public CardUI(Context context, AttributeSet attrs) {
    super(context, attrs);
    //read the number of columns from the attributes
    mColumnNumber = attrs.getAttributeIntValue(null, "columnCount", 1);
    initData(context);
}
 
源代码15 项目: Social   文件: Switch.java
protected void setAttributes(AttributeSet attrs) {

        setBackgroundResource(R.drawable.background_transparent);

        // Set size of view
        setMinimumHeight(Utils.dpToPx(48, getResources()));
        setMinimumWidth(Utils.dpToPx(80, getResources()));

        // Set background Color
        // Color by resource
        int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,
                "background", -1);
        if (bacgroundColor != -1) {
            setBackgroundColor(getResources().getColor(bacgroundColor));
        } else {
            // Color by hexadecimal
            int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
            if (background != -1)
                setBackgroundColor(background);
        }

        check = attrs.getAttributeBooleanValue(MATERIALDESIGNXML, "check",
                false);
        eventCheck = check;
        ball = new Ball(getContext());
        RelativeLayout.LayoutParams params = new LayoutParams(Utils.dpToPx(20,
                getResources()), Utils.dpToPx(20, getResources()));
        params.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
        ball.setLayoutParams(params);
        addView(ball);

    }
 
源代码16 项目: material-components-android   文件: Chip.java
private void validateAttributes(@Nullable AttributeSet attributeSet) {
  if (attributeSet == null) {
    return;
  }
  if (attributeSet.getAttributeValue(NAMESPACE_ANDROID, "background") != null) {
    Log.w(TAG, "Do not set the background; Chip manages its own background drawable.");
  }
  if (attributeSet.getAttributeValue(NAMESPACE_ANDROID, "drawableLeft") != null) {
    throw new UnsupportedOperationException("Please set left drawable using R.attr#chipIcon.");
  }
  if (attributeSet.getAttributeValue(NAMESPACE_ANDROID, "drawableStart") != null) {
    throw new UnsupportedOperationException("Please set start drawable using R.attr#chipIcon.");
  }
  if (attributeSet.getAttributeValue(NAMESPACE_ANDROID, "drawableEnd") != null) {
    throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
  }
  if (attributeSet.getAttributeValue(NAMESPACE_ANDROID, "drawableRight") != null) {
    throw new UnsupportedOperationException("Please set end drawable using R.attr#closeIcon.");
  }
  if (!attributeSet.getAttributeBooleanValue(NAMESPACE_ANDROID, "singleLine", true)
      || (attributeSet.getAttributeIntValue(NAMESPACE_ANDROID, "lines", 1) != 1)
      || (attributeSet.getAttributeIntValue(NAMESPACE_ANDROID, "minLines", 1) != 1)
      || (attributeSet.getAttributeIntValue(NAMESPACE_ANDROID, "maxLines", 1) != 1)) {
    throw new UnsupportedOperationException("Chip does not support multi-line text");
  }

  if (attributeSet.getAttributeIntValue(
          NAMESPACE_ANDROID, "gravity", (Gravity.CENTER_VERTICAL | Gravity.START))
      != (Gravity.CENTER_VERTICAL | Gravity.START)) {
    Log.w(TAG, "Chip text must be vertically center and start aligned");
  }
}
 
源代码17 项目: MoeGallery   文件: Switch.java
protected void setAttributes(AttributeSet attrs) {

        setBackgroundResource(R.drawable.background_transparent);

        // Set size of view
        setMinimumHeight(Utils.dpToPx(48, getResources()));
        setMinimumWidth(Utils.dpToPx(80, getResources()));

        // Set background Color
        // Color by resource
        int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,
                "background", -1);
        if (bacgroundColor != -1) {
			setBackgroundColor(getResources().getColor(bacgroundColor));
		} else {
			// Color by hexadecimal
			int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
			if (background != -1)
				setBackgroundColor(background);
		}

		check = attrs.getAttributeBooleanValue(MATERIALDESIGNXML, "check",
				false);
		eventCheck = check;
		ball = new Ball(getContext());
		RelativeLayout.LayoutParams params = new LayoutParams(Utils.dpToPx(20,
				getResources()), Utils.dpToPx(20, getResources()));
		params.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
		ball.setLayoutParams(params);
		addView(ball);

	}
 
源代码18 项目: AndroidComponentPlugin   文件: PackageParser.java
private static PackageLite parsePackageLite(Resources res, XmlPullParser parser,
        AttributeSet attrs, int flags, String[] outError) throws IOException,
        XmlPullParserException {

    int type;
    while ((type = parser.next()) != XmlPullParser.START_TAG
            && type != XmlPullParser.END_DOCUMENT) {
        ;
    }

    if (type != XmlPullParser.START_TAG) {
        outError[0] = "No start tag found";
        return null;
    }
    if (DEBUG_PARSER)
        Slog.v(TAG, "Root element name: '" + parser.getName() + "'");
    if (!parser.getName().equals("manifest")) {
        outError[0] = "No <manifest> tag";
        return null;
    }
    String pkgName = attrs.getAttributeValue(null, "package");
    if (pkgName == null || pkgName.length() == 0) {
        outError[0] = "<manifest> does not specify package";
        return null;
    }
    String nameError = validateName(pkgName, true);
    if (nameError != null && !"android".equals(pkgName)) {
        outError[0] = "<manifest> specifies bad package name \""
            + pkgName + "\": " + nameError;
        return null;
    }
    int installLocation = PARSE_DEFAULT_INSTALL_LOCATION;
    for (int i = 0; i < attrs.getAttributeCount(); i++) {
        String attr = attrs.getAttributeName(i);
        if (attr.equals("installLocation")) {
            installLocation = attrs.getAttributeIntValue(i,
                    PARSE_DEFAULT_INSTALL_LOCATION);
            break;
        }
    }

    // Only search the tree when the tag is directly below <manifest>
    final int searchDepth = parser.getDepth() + 1;

    final List<VerifierInfo> verifiers = new ArrayList<VerifierInfo>();
    while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
            && (type != XmlPullParser.END_TAG || parser.getDepth() >= searchDepth)) {
        if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
            continue;
        }

        if (parser.getDepth() == searchDepth && "package-verifier".equals(parser.getName())) {
            final VerifierInfo verifier = parseVerifier(res, parser, attrs, flags, outError);
            if (verifier != null) {
                verifiers.add(verifier);
            }
        }
    }

    return new PackageLite(pkgName.intern(), installLocation, verifiers);
}
 
源代码19 项目: MoeGallery   文件: CheckBox.java
protected void setAttributes(AttributeSet attrs) {

		setBackgroundResource(R.drawable.background_checkbox);

		// Set size of view
		setMinimumHeight(Utils.dpToPx(48, getResources()));
		setMinimumWidth(Utils.dpToPx(48, getResources()));

		// Set background Color
		// Color by resource
		int bacgroundColor = attrs.getAttributeResourceValue(ANDROIDXML,
				"background", -1);
		if (bacgroundColor != -1) {
			setBackgroundColor(getResources().getColor(bacgroundColor));
		} else {
			// Color by hexadecimal
			// Color by hexadecimal
			int background = attrs.getAttributeIntValue(ANDROIDXML, "background", -1);
			if (background != -1)
				setBackgroundColor(background);
		}

		final boolean check = attrs.getAttributeBooleanValue(MATERIALDESIGNXML,
				"check", false);
			post(new Runnable() {

				@Override
				public void run() {
					setChecked(check);
					setPressed(false);
					changeBackgroundColor(getResources().getColor(
							android.R.color.transparent));
				}
			});

		checkView = new Check(getContext());
        checkView.setId(View.generateViewId());
		RelativeLayout.LayoutParams params = new LayoutParams(Utils.dpToPx(20,
				getResources()), Utils.dpToPx(20, getResources()));
		params.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
		checkView.setLayoutParams(params);
		addView(checkView);

        // Adding text view to checkbox
        int textResource = attrs.getAttributeResourceValue(ANDROIDXML, "text", -1);
        String text = null;

        if(textResource != -1) {
            text = getResources().getString(textResource);
        } else {
            text = attrs.getAttributeValue(ANDROIDXML, "text");
        }

        if(text != null) {
            params.removeRule(RelativeLayout.CENTER_IN_PARENT);
            params.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
                    TextView textView = new TextView(getContext());
            RelativeLayout.LayoutParams textViewLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT,
                    LayoutParams.WRAP_CONTENT);
            textViewLayoutParams.addRule(RelativeLayout.RIGHT_OF, checkView.getId());
            textViewLayoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
            textViewLayoutParams.setMargins(10, 0, 0, 0);
            textView.setLayoutParams(textViewLayoutParams);
            textView.setText(text);

            addView(textView);
        }
	}
 
源代码20 项目: ThemeDemo   文件: TextViewSkinHelper.java
@Override
public void init(View view, AttributeSet attrs) {
    super.init(view, attrs);
    if (attrs == null) {
        mEnable = false;
        return;
    }

    mLightTextColorRes = attrs.getAttributeResourceValue(ANDROIDXML, "textColor", -1);
    if (mLightTextColorRes == -1) {
        mLightTextColor = attrs.getAttributeIntValue(ANDROIDXML, "textColor", -1);
    }

    int mLightTextColorHighlightRes = attrs.getAttributeResourceValue(ANDROIDXML, "textColorHighlight", -1);
    if (mLightTextColorHighlightRes == -1) {
        mLightTextColorHighlight = attrs.getAttributeIntValue(ANDROIDXML, "textColorHighlight", -1);
    } else {
        mLightTextColorHighlight = view.getContext().getResources().getColor(mLightTextColorHighlightRes);
    }

    mLightTextColorLinkRes = attrs.getAttributeResourceValue(ANDROIDXML, "textColorLink", -1);
    if (mLightTextColorLinkRes == -1) {
        mLightTextColorLink = attrs.getAttributeIntValue(ANDROIDXML, "textColorLink", -1);
    }


    mLightTextColorHintRes = attrs.getAttributeResourceValue(ANDROIDXML, "textColorHint", -1);
    if (mLightTextColorHintRes == -1) {
        mLightTextColorHint = attrs.getAttributeIntValue(ANDROIDXML, "textColorHint", -1);
    }

    mLightTextAppearance = attrs.getAttributeResourceValue(ANDROIDXML, "textAppearance", -1);


    mNightTextColorRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColor", -1);
    if (mNightTextColorRes == -1) {
        mNightTextColor = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightTextColor", -1);
    }

    int mNightTextColorHighlightRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColorHighlight", -1);
    if (mNightTextColorHighlightRes != -1) {
        mNightTextColorHighlight = view.getContext().getResources().getColor(mNightTextColorHighlightRes);

    } else {
        mNightTextColorHighlight = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightTextColorHighlight", -1);

    }

    mNightTextColorLinkRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColorLink", -1);
    if (mNightTextColorLinkRes == -1) {
        mNightTextColorLink = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightTextColorLink", -1);
    }


    mNightTextColorHintRes = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColorHint", -1);
    if (mNightTextColorHintRes == -1) {
        mNightTextColorHint = attrs.getAttributeIntValue(MATERIALDESIGNXML, "nightTextColorHint", -1);
    }
    mNightTextColorAppearance = attrs.getAttributeResourceValue(MATERIALDESIGNXML, "nightTextColorAppearance", -1);
}