Package 

Class ReactViewBackgroundDrawable


  • 
    public class ReactViewBackgroundDrawable
    extends Drawable
                        

    A subclass of Drawable used for background of ReactViewGroup. It supports drawing background color and borders (including rounded borders) by providing a react friendly API (setter for each of those properties).

    The implementation tries to allocate as few objects as possible depending on which properties are set. E.g. for views with rounded background/borders we allocate {@code * mInnerClipPathForBorderRadius} and {@code mInnerClipTempRectForBorderRadius}. In case when view have a rectangular borders we allocate {@code mBorderWidthResult} and similar. When only background color is set we won't allocate any extra/unnecessary objects.