I'd like to implement a custom Preference with an icon and be able to define the source of the icon in the XML specification of the view. If I do
<com.example.MyIconPreference
android:src="@drawable/icon1"
android:key="test_key"
android:title="@string/pref_title"
android:summary="@string/pref_summary"
></com.example.MyIconPreference>
How can I retrieve programmatically the drawable resource or identifier?
Thanks