static String pullFontPathFromView ( Context context , AttributeSet attrs , int [ ] attributeId ) { if ( attributeId == null || attrs == null ) return null ; final String attributeName ; try { attributeName = context . getResources ( ) . getResourceEntryName ( attributeId [ 0 ] ) ; } catch ( Resources . NotFoundException e ) { // invalid attribute ID return null ; } final int stringResourceId = attrs . getAttributeResourceValue ( null , attributeName , - 1 ) ; return stringResourceId > 0 ? context . getString ( stringResourceId ) : attrs . getAttributeValue ( null , attributeName ) ; }
Tries to pull the Custom Attribute directly from the TextView .