belongs to Maven artifact com.android.support:support-emoji:28.0.0-alpha1
FontRequestEmojiCompatConfig
  public
  
  
  
  class
  FontRequestEmojiCompatConfig
  
  
  
  
    extends EmojiCompat.Config
  
  
  
  
  
  
| java.lang.Object | ||
| ↳ | android.support.text.emoji.EmojiCompat.Config | |
| ↳ | android.support.text.emoji.FontRequestEmojiCompatConfig | |
EmojiCompat.Config implementation that asynchronously fetches the required font and the
 metadata using a FontRequest. FontRequest should be constructed to fetch an EmojiCompat
 compatible emoji font.
 
Summary
| Nested classes | |
|---|---|
| 
        
        
        
        
        class | FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicyA retry policy implementation that doubles the amount of time in between retries. | 
| 
        
        
        
        
        class | FontRequestEmojiCompatConfig.RetryPolicyRetry policy used when the font provider is not ready to give the font file. | 
| Public constructors | |
|---|---|
| 
      FontRequestEmojiCompatConfig(Context context, FontRequest request)
       | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        FontRequestEmojiCompatConfig | 
      setHandler(Handler handler)
      Sets the custom handler to be used for initialization. | 
| 
        
        
        
        
        
        FontRequestEmojiCompatConfig | 
      setRetryPolicy(FontRequestEmojiCompatConfig.RetryPolicy policy)
      Sets the retry policy. | 
| Inherited methods | |
|---|---|
|  From
class 
  
    android.support.text.emoji.EmojiCompat.Config
  
 | |
|  From
class 
  
    java.lang.Object
  
 | |
Public constructors
FontRequestEmojiCompatConfig
FontRequestEmojiCompatConfig (Context context, FontRequest request)
| Parameters | |
|---|---|
| context | Context: Context instance, cannot benull | 
| request | FontRequest:FontRequestto fetch the font asynchronously, cannot benull | 
Public methods
setHandler
FontRequestEmojiCompatConfig setHandler (Handler handler)
Sets the custom handler to be used for initialization. Since font fetch take longer time, the metadata loader will fetch the fonts on the background thread. You can pass your own handler for this background fetching. This handler is also used for retrying.
| Parameters | |
|---|---|
| handler | Handler: AHandlerto be used for initialization. Can benull. In case
               ofnull, the metadata loader creates ownHandlerThreadfor
               initialization. | 
| Returns | |
|---|---|
| FontRequestEmojiCompatConfig | |
setRetryPolicy
FontRequestEmojiCompatConfig setRetryPolicy (FontRequestEmojiCompatConfig.RetryPolicy policy)
Sets the retry policy.
| Parameters | |
|---|---|
| policy | FontRequestEmojiCompatConfig.RetryPolicy: The policy to be used when the font provider is not ready to give the font
              file. Can benull. In case ofnull, the metadata loader never
              retries. | 
| Returns | |
|---|---|
| FontRequestEmojiCompatConfig | |
See also:
- Interfaces
- Classes- EmojiCompat
- EmojiCompat.Config
- EmojiCompat.InitCallback
- EmojiCompat.MetadataRepoLoaderCallback
- EmojiSpan
- FontRequestEmojiCompatConfig
- FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy
- FontRequestEmojiCompatConfig.RetryPolicy
- MetadataRepo
- R
- R.attr
- R.bool
- R.color
- R.dimen
- R.drawable
- R.id
- R.integer
- R.layout
- R.string
- R.style
- R.styleable
 
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.
