feat:Image add imageFilePath

This commit is contained in:
pengfei.zhou
2021-08-05 17:42:45 +08:00
committed by osborn
parent 57cfdd38e1
commit bfa865fe5d
11 changed files with 86 additions and 20 deletions

View File

@@ -51,6 +51,8 @@ import com.github.pengfeizhou.jscore.JSONBuilder;
import com.github.pengfeizhou.jscore.JSObject;
import com.github.pengfeizhou.jscore.JSValue;
import java.io.File;
import jp.wasabeef.glide.transformations.BlurTransformation;
import pub.doric.DoricContext;
import pub.doric.extension.bridge.DoricPlugin;
@@ -422,6 +424,14 @@ public class ImageNode extends ViewNode<ImageView> {
}
}
break;
case "imageFilePath":
if (!prop.isString()) {
return;
}
String filePath = prop.asString().value();
File file = new File(filePath);
loadIntoTarget(Glide.with(getContext()).load(file));
break;
default:
super.blend(view, name, prop);
break;