private void processAttributes(final Context context, @Nullable final AttributeSet attrs, final int defStyle) {
        if (attrs == null) {
            return;
        }
        final TypedArray types = context.obtainStyledAttributes(attrs, getAttributeNames(),
                defStyle, 0);

        processAttributeValues(types);

        types.recycle();
    }
Base class for preferences which evaluate their XML attributes for further processing.
main/src/main/java/cgeo/geocaching/settings/AbstractAttributeBasedPreference.java