| Nested classes | 
|---|
  
    
      | 
        
        
        
        
        class | ShadowOverlayHelper.BuilderBuilder for creating ShadowOverlayHelper. 
        
    
 | 
    
    
    
      | 
        
        
        
        
        class | ShadowOverlayHelper.OptionsOption values for ShadowOverlayContainer. 
        
    
 | 
    
    
| Inherited methods | 
|---|
|  From
class 
  
    java.lang.Object
  
  
   
    
      
  
  
  
  
    | 
        
        
        
        
        
        Object | 
      clone()
       |  
  
  
    | 
        
        
        
        
        
        boolean | 
      equals(Object arg0)
       |  
  
  
    | 
        
        
        
        
        
        void | 
      finalize()
       |  
  
  
    | 
        
        
        
        final
        
        Class<?> | 
      getClass()
       |  
  
  
    | 
        
        
        
        
        
        int | 
      hashCode()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notify()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      notifyAll()
       |  
  
  
    | 
        
        
        
        
        
        String | 
      toString()
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0, int arg1)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait(long arg0)
       |  
  
  
    | 
        
        
        
        final
        
        void | 
      wait()
       |  | 
Constants
    SHADOW_DYNAMIC
    
int SHADOW_DYNAMIC
    
    
    
  Shadows depend on the size, shape, and position of the view.
    
      Constant Value:
      
          3
          (0x00000003)
      
    
 
    SHADOW_NONE
    
int SHADOW_NONE
    
    
    
  No shadow.
    
      Constant Value:
      
          1
          (0x00000001)
      
    
 
    SHADOW_STATIC
    
int SHADOW_STATIC
    
    
    
  Shadows are fixed.
    
      Constant Value:
      
          2
          (0x00000002)
      
    
 
Public methods
    createShadowOverlayContainer
    
ShadowOverlayContainer createShadowOverlayContainer (Context context)
    
    
    
  Create ShadowOverlayContainer for this helper.
    
    | Parameters | 
|---|
      
        | context | Context: Context to create view. | 
    
    
 
    getShadowType
    
int getShadowType ()
    
    
    
  
    
 
    needsOverlay
    
boolean needsOverlay ()
    
    
    
  
    
 
    needsRoundedCorner
    
boolean needsRoundedCorner ()
    
    
    
  
    
 
    needsWrapper
    
boolean needsWrapper ()
    
    
    
  Returns true if a "wrapper" ShadowOverlayContainer is needed.
 When needsWrapper() is true,  call createShadowOverlayContainer(Context)
 to create the wrapper.
    
 
    onViewCreated
    
void onViewCreated (View view)
    
    
    
  Must be called when view is created for cases needsWrapper() is false.
 
    prepareParentForShadow
    
void prepareParentForShadow (ViewGroup parent)
    
    
    
  prepareParentForShadow(ViewGroup) must be called on parent of container
 before using shadow.  Depending on Shadow type, optical bounds might be applied.
    
    | Parameters | 
|---|
      
        | parent | ViewGroup | 
    
 
    setNoneWrapperOverlayColor
    
void setNoneWrapperOverlayColor (View view, 
                int color)
    
    
    
  Set overlay color for view other than ShadowOverlayContainer.
 See also setOverlayColor(int).
    
    | Parameters | 
|---|
      
        | view | View | 
      
        | color | int | 
    
 
    setNoneWrapperShadowFocusLevel
    
void setNoneWrapperShadowFocusLevel (View view, 
                float level)
    
    
    
  Set shadow focus level (0 to 1). 0 for unfocused, 1 for fully focused.
 This is for view other than ShadowOverlayContainer.
 See also setShadowFocusLevel(float).
    
    | Parameters | 
|---|
      
        | view | View | 
      
        | level | float | 
    
 
    setOverlayColor
    
void setOverlayColor (View view, 
                int color)
    
    
    
  Set overlay color for view, it can be a ShadowOverlayContainer if needsWrapper() is true,
 or other view type.
    
    | Parameters | 
|---|
      
        | view | View | 
      
        | color | int | 
    
 
    setShadowFocusLevel
    
void setShadowFocusLevel (View view, 
                float level)
    
    
    
  Set shadow focus level (0 to 1). 0 for unfocused, 1 for fully focused.
    
    | Parameters | 
|---|
      
        | view | View | 
      
        | level | float | 
    
 
    supportsDynamicShadow
    
boolean supportsDynamicShadow ()
    
    
    
  Returns true if the platform sdk supports dynamic shadows.
    
 
    supportsForeground
    
boolean supportsForeground ()
    
    
    
  Returns true if view.setForeground() is supported.
    
 
    supportsRoundedCorner
    
boolean supportsRoundedCorner ()
    
    
    
  Returns true if the platform sdk supports rounded corner through outline.
    
 
    supportsShadow
    
boolean supportsShadow ()
    
    
    
  Return true if the platform sdk supports shadow.
    
 
  
  
    
  
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]