Class ShadowBitmapFactory

    • Constructor Detail

      • ShadowBitmapFactory

        public ShadowBitmapFactory()
    • Method Detail

      • decodeFile

        @Implementation
        protected static Bitmap decodeFile​(String pathName)
      • decodeStream

        @Implementation
        protected static Bitmap decodeStream​(InputStream is)
      • decodeByteArray

        @Implementation
        protected static Bitmap decodeByteArray​(byte[] data,
                                                int offset,
                                                int length)
      • decodeByteArray

        @Implementation
        protected static Bitmap decodeByteArray​(byte[] data,
                                                int offset,
                                                int length,
                                                BitmapFactory.Options opts)
      • provideWidthAndHeightHints

        @Deprecated
        public static void provideWidthAndHeightHints​(Uri uri,
                                                      int width,
                                                      int height)
        Deprecated.
        Use any of the BitmapFactory.decode methods with real image data.
      • provideWidthAndHeightHints

        @Deprecated
        public static void provideWidthAndHeightHints​(int resourceId,
                                                      int width,
                                                      int height)
        Deprecated.
        Use any of the BitmapFactory.decode methods with real image data.
      • provideWidthAndHeightHints

        @Deprecated
        public static void provideWidthAndHeightHints​(String file,
                                                      int width,
                                                      int height)
        Deprecated.
        Use any of the BitmapFactory.decode methods with real image data.
      • provideWidthAndHeightHints

        @Deprecated
        public static void provideWidthAndHeightHints​(FileDescriptor fd,
                                                      int width,
                                                      int height)
        Deprecated.
        Use any of the BitmapFactory.decode methods with real image data.
      • reset

        @Resetter
        public static void reset()
      • setAllowInvalidImageData

        public static void setAllowInvalidImageData​(boolean allowInvalidImageData)
        Whether the BitmapFactory.decode methods, such as BitmapFactory.decodeStream(InputStream, Rect, Options) should allow invalid image data and always return Bitmap objects. If set to false, BitmapFactory.decode methods will be consistent with real Android, and return null Bitmap values and set BitmapFactory.Options.outWidth and BitmapFactory.Options.outHeight to -1.
        Parameters:
        allowInvalidImageData - whether invalid bitmap data is allowed and BitmapFactory should always return Bitmap objects.