belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
IconCompat
  public
  
  
  
  class
  IconCompat
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.support.v4.graphics.drawable.IconCompat | 
Helper for accessing features in Icon.
Summary
Public methods | |
|---|---|
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithAdaptiveBitmap(Bitmap bits)
      
      
        Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined
 by   | 
  
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithBitmap(Bitmap bits)
      
      
        Create an Icon pointing to a bitmap in memory.  | 
  
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithContentUri(String uri)
      
      
        Create an Icon pointing to an image file specified by URI.  | 
  
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithContentUri(Uri uri)
      
      
        Create an Icon pointing to an image file specified by URI.  | 
  
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithData(byte[] data, int offset, int length)
      
      
        Create an Icon pointing to a compressed bitmap stored in a byte array.  | 
  
        
        
        static
        
        
        IconCompat
     | 
  
    
      
      createWithResource(Context context, int resId)
      
      
        Create an Icon pointing to a drawable resource.  | 
  
        
        
        
        
        
        Icon
     | 
  
    
      
      toIcon()
      
      
        Convert this compat object to   | 
  
Inherited methods | |
|---|---|
  
    
  
    java.lang.Object
  
 | |
Public methods
createWithAdaptiveBitmap
IconCompat createWithAdaptiveBitmap (Bitmap bits)
Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined
 by AdaptiveIconDrawable.
| Parameters | |
|---|---|
bits | 
        
          Bitmap: A valid Bitmap object | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
createWithBitmap
IconCompat createWithBitmap (Bitmap bits)
Create an Icon pointing to a bitmap in memory.
| Parameters | |
|---|---|
bits | 
        
          Bitmap: A valid Bitmap object | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
createWithContentUri
IconCompat createWithContentUri (String uri)
Create an Icon pointing to an image file specified by URI.
| Parameters | |
|---|---|
uri | 
        
          String: A uri referring to local content:// or file:// image data. | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
createWithContentUri
IconCompat createWithContentUri (Uri uri)
Create an Icon pointing to an image file specified by URI.
| Parameters | |
|---|---|
uri | 
        
          Uri: A uri referring to local content:// or file:// image data. | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
createWithData
IconCompat createWithData (byte[] data, int offset, int length)
Create an Icon pointing to a compressed bitmap stored in a byte array.
| Parameters | |
|---|---|
data | 
        
          byte: Byte array storing compressed bitmap data of a type that
             BitmapFactory
             can decode (see Bitmap.CompressFormat). | 
      
offset | 
        
          int: Offset into data at which the bitmap data starts | 
      
length | 
        
          int: Length of the bitmap data | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
createWithResource
IconCompat createWithResource (Context context, int resId)
Create an Icon pointing to a drawable resource.
| Parameters | |
|---|---|
context | 
        
          Context: The context for the application whose resources should be used to resolve the
                given resource ID. | 
      
resId | 
        
          int: ID of the drawable resource | 
      
| Returns | |
|---|---|
IconCompat | 
        |
See also:
toIcon
Icon toIcon ()
Convert this compat object to Icon object.
| Returns | |
|---|---|
Icon | 
        Icon object
 |