Class ShadowArscResourcesImpl


  • @Implements(value=android.content.res.ResourcesImpl.class,
                isInAndroidSdk=false,
                minSdk=24,
                shadowPicker=Picker.class)
    public class ShadowArscResourcesImpl
    extends ShadowResourcesImpl
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getQuantityString​(int resId, int quantity)  
      java.lang.String getQuantityString​(int id, int quantity, java.lang.Object... formatArgs)  
      android.graphics.drawable.Drawable loadDrawable​(android.content.res.Resources wrapper, android.util.TypedValue value, int id, int density, android.content.res.Resources.Theme theme)  
      android.graphics.drawable.Drawable loadDrawable​(android.content.res.Resources wrapper, android.util.TypedValue value, int id, android.content.res.Resources.Theme theme, boolean useCache)  
      java.io.InputStream openRawResource​(int id)  
      android.content.res.AssetFileDescriptor openRawResourceFd​(int id)
      Since AssetFileDescriptors are not yet supported by Robolectric, null will be returned if the resource is found.
      static void reset()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowArscResourcesImpl

        public ShadowArscResourcesImpl()
    • Method Detail

      • reset

        @Resetter
        public static void reset()
      • getQuantityString

        @Implementation(maxSdk=23)
        public java.lang.String getQuantityString​(int id,
                                                  int quantity,
                                                  java.lang.Object... formatArgs)
                                           throws android.content.res.Resources.NotFoundException
        Throws:
        android.content.res.Resources.NotFoundException
      • getQuantityString

        @Implementation(maxSdk=23)
        public java.lang.String getQuantityString​(int resId,
                                                  int quantity)
                                           throws android.content.res.Resources.NotFoundException
        Throws:
        android.content.res.Resources.NotFoundException
      • openRawResource

        @Implementation(maxSdk=23)
        public java.io.InputStream openRawResource​(int id)
                                            throws android.content.res.Resources.NotFoundException
        Throws:
        android.content.res.Resources.NotFoundException
      • openRawResourceFd

        @Implementation(maxSdk=23)
        public android.content.res.AssetFileDescriptor openRawResourceFd​(int id)
                                                                  throws android.content.res.Resources.NotFoundException
        Since AssetFileDescriptors are not yet supported by Robolectric, null will be returned if the resource is found. If the resource cannot be found, Resources.NotFoundException will be thrown.
        Throws:
        android.content.res.Resources.NotFoundException
      • loadDrawable

        @Implementation(maxSdk=25)
        public android.graphics.drawable.Drawable loadDrawable​(android.content.res.Resources wrapper,
                                                               android.util.TypedValue value,
                                                               int id,
                                                               android.content.res.Resources.Theme theme,
                                                               boolean useCache)
                                                        throws android.content.res.Resources.NotFoundException
        Throws:
        android.content.res.Resources.NotFoundException
      • loadDrawable

        @Implementation(minSdk=26)
        public android.graphics.drawable.Drawable loadDrawable​(android.content.res.Resources wrapper,
                                                               android.util.TypedValue value,
                                                               int id,
                                                               int density,
                                                               android.content.res.Resources.Theme theme)