Created
September 9, 2018 15:29
-
-
Save Orange168/e61520b210f9fe57d7c5d67411a48447 to your computer and use it in GitHub Desktop.
[获取xml属性值] #UI#Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final TypedArray a = context.obtainStyledAttributes(attrs, | |
R.styleable.DialogPreference, defStyleAttr, defStyleRes); | |
mDialogTitle = TypedArrayUtils.getString(a, R.styleable.DialogPreference_dialogTitle, | |
R.styleable.DialogPreference_android_dialogTitle); | |
mDialogIcon = TypedArrayUtils.getDrawable(a, R.styleable.DialogPreference_dialogIcon, | |
R.styleable.DialogPreference_android_dialogIcon); | |
mDialogLayoutResId = TypedArrayUtils.getResourceId(a, | |
R.styleable.DialogPreference_dialogLayout, | |
R.styleable.DialogPreference_android_dialogLayout, 0); | |
a.recycle(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment