Example usage for android.support.v4.content.res TypedArrayUtils getAttr

List of usage examples for android.support.v4.content.res TypedArrayUtils getAttr

Introduction

In this page you can find the example usage for android.support.v4.content.res TypedArrayUtils getAttr.

Prototype

public static int getAttr(Context context, int attr, int fallbackAttr) 

Source Link

Usage

From source file:com.android.settings.display.ScreenZoomPreference.java

public ScreenZoomPreference(Context context, AttributeSet attrs) {
    super(context, attrs, TypedArrayUtils.getAttr(context,
            android.support.v7.preference.R.attr.preferenceScreenStyle, android.R.attr.preferenceScreenStyle));

    if (TextUtils.isEmpty(getFragment())) {
        setFragment("com.android.settings.display.ScreenZoomSettings");
    }//from  w ww  .ja  v  a  2  s.c  o m

    final DisplayDensityUtils density = new DisplayDensityUtils(context);
    final int defaultIndex = density.getCurrentIndex();
    if (defaultIndex < 0) {
        setVisible(false);
        setEnabled(false);
    } else if (TextUtils.isEmpty(getSummary())) {
        final String[] entries = density.getEntries();
        final int currentIndex = density.getCurrentIndex();
        setSummary(entries[currentIndex]);
    }
}

From source file:com.android.settings.widget.FooterPreference.java

public FooterPreference(Context context, AttributeSet attrs) {
    super(context, attrs,
            TypedArrayUtils.getAttr(context, R.attr.footerPreferenceStyle, android.R.attr.preferenceStyle));
    init();/*from   www.  j ava2s.c o  m*/
}

From source file:android.support.v7.preference.EditTextPreference.java

public EditTextPreference(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, R.attr.editTextPreferenceStyle,
            AndroidResources.ANDROID_R_EDITTEXT_PREFERENCE_STYLE));
}

From source file:com.android.settingslib.RestrictedPreference.java

public RestrictedPreference(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.preferenceStyle,
            android.R.attr.preferenceStyle));
}

From source file:android.support.v7.preference.PreferenceCategory.java

public PreferenceCategory(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, R.attr.preferenceCategoryStyle,
            android.R.attr.preferenceCategoryStyle));
}

From source file:com.android.settings.widget.RadioButtonPreference.java

public RadioButtonPreference(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.preferenceStyle,
            android.R.attr.preferenceStyle));
}

From source file:com.android.settings.datausage.CellDataPreference.java

public CellDataPreference(Context context, AttributeSet attrs) {
    super(context, attrs, TypedArrayUtils.getAttr(context,
            android.support.v7.preference.R.attr.switchPreferenceStyle, android.R.attr.switchPreferenceStyle));
}

From source file:com.android.settings.applications.ClearDefaultsPreference.java

public ClearDefaultsPreference(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.preferenceStyle,
            android.R.attr.preferenceStyle));
}

From source file:android.support.v7.preference.MultiSelectListPreference.java

public MultiSelectListPreference(Context context, AttributeSet attrs) {
    this(context, attrs, TypedArrayUtils.getAttr(context, R.attr.dialogPreferenceStyle,
            android.R.attr.dialogPreferenceStyle));
}

From source file:com.android.settings.SeekBarPreference.java

public SeekBarPreference(Context context, AttributeSet attrs) {
    this(context, attrs,
            TypedArrayUtils.getAttr(context, android.support.v7.preference.R.attr.seekBarPreferenceStyle,
                    com.android.internal.R.attr.seekBarPreferenceStyle));
}