Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EddyVerbruggen/4087b951e432f10769327cac8cb32ed1 to your computer and use it in GitHub Desktop.
Save EddyVerbruggen/4087b951e432f10769327cac8cb32ed1 to your computer and use it in GitHub Desktop.
Change appearance of Activity Indicators in NativeScript RadListView
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