How to correctly read attributes from android namespace in custom Preference?
<p>I am writing a custom <code>Preference</code>. I can easily read attribute values in my private namespace:</p>

<pre><code>public MyPreference(Context context, AttributeSet attrs)
{
    super(context, attrs);
    TypedArray styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.MyPreference);
    mDefaultValue = styledAttrs.getInt(R.styleable.MyPreference_defaultValue, 0);
}
</code></pre>

<p>But I do not know, how to read android attributes, e.g. <code>android:defaultValue</code>. In all examples on the web attributes contain values, but I use resources like <code>@integer/my_number</code> so simply reading <code>attrs</code> does not work - attribute contains resource reference but not the value. android.R.styleable is not accessible, so I do not understand how to do it.</p>
