diff --git a/ios-ts-lib/helpers.js b/ios-ts-lib/helpers.js index c689c20..c547df7 100644 --- a/ios-ts-lib/helpers.js +++ b/ios-ts-lib/helpers.js @@ -2,7 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); var types = require("tns-core-modules/utils/types"); var utils = require("tns-core-modules/utils/utils"); -var imageSource = require("tns-core-modules/image-source"); +// var imageSource = require("tns-core-modules/image-source"); +import { ImageSource } from "tns-core-modules/image-source"; var Helpers = (function () { function Helpers() { } @@ -35,7 +36,7 @@ var Helpers = (function () { } else if (utils.isFileOrResourcePath(value)) { image.isLoading = true; - var source_1 = new imageSource.ImageSource(); + var source_1 = new ImageSource(); if (0 === value.indexOf(utils.RESOURCE_PREFIX)) { var path = value.substr(utils.RESOURCE_PREFIX.length); source_1.fromResource(path).then(function () { @@ -56,7 +57,7 @@ var Helpers = (function () { Helpers.getPlaceholderUIImage = function (value) { if (types.isString(value)) { if (utils.isFileOrResourcePath(value)) { - return imageSource.fromFileOrResource(value).ios; + return ImageSource.fromFileOrResource(value).ios; } } return undefined; diff --git a/ios-ts-lib/helpers.ts b/ios-ts-lib/helpers.ts index 4c5b388..065e7b8 100644 --- a/ios-ts-lib/helpers.ts +++ b/ios-ts-lib/helpers.ts @@ -4,8 +4,8 @@ import * as types from 'tns-core-modules/utils/types'; import * as utils from 'tns-core-modules/utils/utils'; import * as fs from 'tns-core-modules/file-system'; import * as appSettings from 'tns-core-modules/application-settings'; -import * as imageSource from 'tns-core-modules/image-source'; - +// import * as imageSource from 'tns-core-modules/image-source'; +import { ImageSource } from "tns-core-modules/image-source"; declare class UIViewContentMode { @@ -53,7 +53,7 @@ export class Helpers { }); } else if (utils.isFileOrResourcePath(value)) { image.isLoading = true; - let source: any = new imageSource.ImageSource(); + let source: any = new ImageSource(); if (0 === value.indexOf(utils.RESOURCE_PREFIX)) { let path = value.substr(utils.RESOURCE_PREFIX.length); @@ -77,7 +77,7 @@ export class Helpers { public static getPlaceholderUIImage(value) { if (types.isString(value)) { if (utils.isFileOrResourcePath(value)) { - return imageSource.fromFileOrResource(value).ios; + return ImageSource.fromFileOrResource(value).ios; } } diff --git a/platforms/android/include.gradle b/platforms/android/include.gradle index 4624042..459dcd4 100644 --- a/platforms/android/include.gradle +++ b/platforms/android/include.gradle @@ -9,5 +9,5 @@ android { } dependencies { - compile "com.facebook.fresco:fresco:1.10.0" + compile "com.facebook.fresco:fresco:2.1.0" }