Last active
October 21, 2018 17:04
-
-
Save EddyVerbruggen/4087b951e432f10769327cac8cb32ed1 to your computer and use it in GitHub Desktop.
Change appearance of Activity Indicators in NativeScript RadListView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ComponentWithRadListView { | |
// assuming you have something like this in your view: | |
// <RadListView (loaded)="onOrderListLoaded($event)"> | |
onOrderListLoaded(args): void { | |
const listViewElement = <RadListView>args.object; | |
const tk: any = listViewElement.ios; | |
if (tk && tk.pullToRefreshView) { | |
tk.pullToRefreshView.activityIndicator.color = new Color("#4CC55B").ios; | |
tk.pullToRefreshView.activityIndicator.transform = CGAffineTransformMakeScale(0.75, 0.75); | |
} | |
if (tk && tk.loadOnDemandView) { | |
if (tk.loadOnDemandView.subviews && tk.loadOnDemandView.subviews.count === 1) { | |
const activityIndicator = tk.loadOnDemandView.subviews[0]; | |
activityIndicator.color = new Color("#4CC55B").ios; | |
activityIndicator.transform = CGAffineTransformMakeScale(0.75, 0.75); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment