private void init(Context context, AttributeSet attrs) { setLayoutResource(R.layout.ate_preference_custom); if (attrs != null) { TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ATEDialogPreference, 0, 0); try { mKey = a.getString(R.styleable.ATEDialogPreference_ateKey_pref_dialog); } finally { a.recycle(); } } }
private void init(Context context, AttributeSet attrs) { setLayoutResource(R.layout.ate_preference_custom); if (attrs != null) { TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ATEDialogPreference, 0, 0); try { mKey = a.getString(R.styleable.ATEDialogPreference_ateKey_pref_dialog); } finally { a.recycle(); } } if (!Config.usingMaterialDialogs(context, mKey)) { ATE.config(context, mKey) .usingMaterialDialogs(true) .commit(); } }