com.zhy.autolayout.utils.DimenUtils Java Examples
The following examples show how to use
com.zhy.autolayout.utils.DimenUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AutoTabLayout.java From Aurora with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) return NO_VALID; return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #2
Source File: AutoToolbar.java From LQRWeChat with MIT License | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) return NO_VALID; return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #3
Source File: AutoToolbar.java From MVPArms with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) { return NO_VALID; } return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #4
Source File: AutoTabLayout.java From MVPArms with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) { return NO_VALID; } return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #5
Source File: AutoToolbar.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) return NO_VALID; return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #6
Source File: AutoActionMenuItemView.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) return NO_VALID; return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }
Example #7
Source File: AutoTabLayout.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
private int loadTextSizeFromTextAppearance(int textAppearanceResId) { TypedArray a = getContext().obtainStyledAttributes(textAppearanceResId, R.styleable.TextAppearance); try { if (!DimenUtils.isPxVal(a.peekValue(R.styleable.TextAppearance_android_textSize))) return NO_VALID; return a.getDimensionPixelSize(R.styleable.TextAppearance_android_textSize, NO_VALID); } finally { a.recycle(); } }