private ScaleTypeDrawable getScaleTypeDrawableAtIndex ( int index ) { DrawableParent parent = getParentDrawableAtIndex ( index ) ; if ( parent instanceof ScaleTypeDrawable ) { return ( ScaleTypeDrawable ) parent ; } else { return WrappingUtils . wrapChildWithScaleType ( parent , ScalingUtils . ScaleType . FIT_XY ) ; } }
Gets the ScaleTypeDrawable at the specified index . In case there is no child at the specified index a NullPointerException is thrown . In case there is a child but the ScaleTypeDrawable does not exist the child will be wrapped with a new ScaleTypeDrawable .