Android: Custom Xml Attributes for PreferenceScreen -


I use custom xml property for preferences Priorities are inflated by XML

I By creating a custom class passed from the preferred preference category, managed to create and read custom xml properties for EditTextPreference, ListPreference and CheckBoxPreference.

In the creator of the class, I can read such characteristics:

  public class CustomTextPreference extends EditTextPreference {public reference text (reference reference, AttributeSet attrs) { Super (references, ethers); TypedArray a = reference Toilet Styling Properties (Atters, R. Slabal, Pragatic Casteate Arts); X = a.getString (R.stable.printCustom_Etters_x); Y = a.getString (R.styleable.PreferenceCustomAttrs_y); }}  

My problem is that I can not do this for the priority cell because it is the last category. So my question is: can I read the custom attributes of a PreferenceScreen in any way?

Remember not by the same technique that you are using, however, priority XML files only There are XML resources you can get a parser for file through getResources (). GetXml () from your priority . From there, you can read whatever you like.


Comments