package com.reactnativenavigation.react;

import android.graphics.drawable.Drawable;

import com.reactnativenavigation.NavigationApplication;

public class ImageLoader {

    public static Drawable loadImage(String iconSource) {
        if (NavigationApplication.instance.isDebug()) {
            return JsDevImageLoader.loadIcon(iconSource);
        } else {
            return ResourceDrawableIdHelper.instance.getResourceDrawable(NavigationApplication.instance, iconSource);
        }
    }
}

@@ -68,16 +68,22 @@
 rawable.
+Bitmap
 Drawable
@@ -83,16 +83,83 @@
 rawable;
+%0Aimport android.graphics.drawable.Drawable;%0Aimport android.net.Uri;
 %0A%0Aimport
@@ -235,16 +235,70 @@
 Loader %7B
+%0A    private static final String FILE_SCHEME = %22file%22;
 %0A%0A    pu
@@ -480,24 +480,563 @@
  else %7B%0A    
+        Uri uri = Uri.parse(iconSource);%0A            if (isLocalFile(uri)) %7B%0A                return loadFile(uri);%0A            %7D else %7B%0A                return loadResource(iconSource);%0A            %7D%0A        %7D%0A    %7D%0A%0A    private static boolean isLocalFile(Uri uri) %7B%0A        return FILE_SCHEME.equals(uri.getScheme());%0A    %7D%0A%0A    private static Drawable loadFile(Uri uri) %7B%0A        return new BitmapDrawable(NavigationApplication.instance.getResources(), uri.getPath());%0A    %7D%0A%0A    private static Drawable loadResource(String iconSource) %7B%0A
         retu
@@ -1137,26 +1137,16 @@
 ource);%0A
-        %7D%0A
     %7D%0A%7D%0A

Support loading images from local storage