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

Commit cfc37bd

Browse files
committed
refactor(android-loading-indicator): Update deprecated API usage.
fromFileOrResource() is deprecated, updated to use the new API.
1 parent eed98f2 commit cfc37bd

File tree

2 files changed

+2
-2
lines changed

2 files 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';
@@ -577,7 +577,7 @@ export class LoadingIndicator {
577577
.replace('.jpg', '')
578578
.replace('.png', '')
579579
.replace('.jpeg', '');
580-
const image = fromFileOrResource('res://' + fileName);
580+
const image = ImageSource.fromFileOrResourceSync('res://' + fileName);
581581
if (image && image.android) {
582582
customView.setImageBitmap(image.android);
583583
}
Binary file not shown.

0 commit comments

Comments
 (0)