private void obtainUnit ( @ NonNull final TypedArray typedArray ) { CharSequence obtainedUnit = typedArray . getText ( R . styleable . AbstractUnitPreference_unit ) ; if ( obtainedUnit == null ) { obtainedUnit = getContext ( ) . getText ( R . string . resolution_preference_unit ) ; } setUnit ( obtainedUnit ) ; }
Obtains the unit of the resolution which is shown in the preference s dialog from a specific typed array .