Skip to content
This repository was archived by the owner on Dec 19, 2021. It is now read-only.

Commit f053da2

Browse files
authored
Merge pull request #33 from Codex-/update_imagesource_usage
refactor(android-loading-indicator): Update deprecated API usage.
2 parents 74943a7 + cfc37bd commit f053da2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/loading-indicator.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as application from '@nativescript/core/application';
22
import { Color } from '@nativescript/core/color';
3-
import { fromFileOrResource } from '@nativescript/core/image-source';
3+
import { ImageSource } from '@nativescript/core/image-source';
44
import { screen } from '@nativescript/core/platform';
55
import { Frame } from '@nativescript/core/ui/frame';
66
import { ad as androidUtils } from '@nativescript/core/utils/utils';
@@ -616,7 +616,7 @@ export class LoadingIndicator {
616616
.replace('.jpg', '')
617617
.replace('.png', '')
618618
.replace('.jpeg', '');
619-
const image = fromFileOrResource('res://' + fileName);
619+
const image = ImageSource.fromFileOrResourceSync('res://' + fileName);
620620
if (image && image.android) {
621621
customView.setImageBitmap(image.android);
622622
}

0 commit comments

Comments
 (0)