Please take a minute to read our NativeScript Code of Conduct before proceeding with posting issues or discussing. The purpose of this guide is to make communication and cooperation within our forums a pleasure for you and the other members.
The RadListView background is no longer respected for item templates. Headers are ok.
Android
Issue only occurs with nativescript-ui-listview 7.1.0 and 7.0.5. Reverting to 7.0.4 fixes the issue
Add a Listview with backgroundColor="blue" and the following template:
<StackLayout backgroundColor="black" marginTop="10" height="100"></StackLayout>
There will be a white margin on top, instead of a blue one.
Hi @edusperoni ,
Thank you for reporting this issue. We have already observed it and have found its source. It is being tested so you can expect and patch fix version very soon.
A similar problem exists (or existed) on iOS too. So I just tried to apply a similar fix to android.
Can you try this on your side as a workaround? (working for me on android)
Add this to your radlist
(itemLoading)="onItemLoading($event)"
And here is the handler:
onItemLoading(args: ListViewEventData) {
if (isIOS) {
// set stuff transparent on ios
var newcolor = new Color(0,0,0,0);
var cell = args.view.ios.superview.superview;
cell.layer.sublayers.objectAtIndex(1).hidden = true;
args.ios.backgroundView.backgroundColor = newcolor.ios;
} else {
// set stuff transparent on android
var newcolor = new Color(0,0,0,0);
args.view.android.setBackgroundColor(newcolor.android);
args.view.parent.android.setBackgroundColor(newcolor.android);
}
}
@mpht, works perfectly on Android. Thank you!
The fix is released in [email protected]
Most helpful comment
Hi @edusperoni ,
Thank you for reporting this issue. We have already observed it and have found its source. It is being tested so you can expect and patch fix version very soon.