From f1c6fbd1fc1ddd889557ea32924f2a44204a1750 Mon Sep 17 00:00:00 2001 From: lishidi Date: Fri, 24 Feb 2017 14:18:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add=20support=20for=20=20internal=20data?= =?UTF-8?q?=E2=80=99s=20image=20on=20Android=20device?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebImageCache.android.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WebImageCache.android.js b/WebImageCache.android.js index 0541800..662719f 100644 --- a/WebImageCache.android.js +++ b/WebImageCache.android.js @@ -92,7 +92,6 @@ function onSrcPropertySet(data){ } function setSource(image,value){ image.android.setImageURI(null, null); - if (types.isString(value)) { value = value.trim(); if(utils.isFileOrResourcePath(value) || 0===value.indexOf("http")){ @@ -110,6 +109,8 @@ function setSource(image,value){ }else if(0===value.indexOf("http")){ image.isLoading=true; fileName=value; + }else if(fs.File.exists(value)){ + fileName="file:"+ value; } image.android.setImageURI(android.net.Uri.parse(fileName), null); @@ -127,6 +128,7 @@ function setSource(image,value){ image.requestLayout(); }else{ + console.log('not match shidi'); throw new Error("Path \"" + "\" is not a valid file or resource."); } } From c460271d7673332ccbc4837e51bba4101b05863b Mon Sep 17 00:00:00 2001 From: ITonly <1264433268@qq.com> Date: Wed, 25 Oct 2017 15:07:19 +0800 Subject: [PATCH 2/2] Update WebImageCache.android.js --- WebImageCache.android.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebImageCache.android.js b/WebImageCache.android.js index 29b6e6c..1e97eb7 100644 --- a/WebImageCache.android.js +++ b/WebImageCache.android.js @@ -219,7 +219,7 @@ exports.initializeOnAngular = function(){ isInitialized=true; } }; -======= + /** * Created by sumeet on 17-06-2016. */