NativeScript / nativescript-angular

Integrating NativeScript with Angular
http://docs.nativescript.org/angular/tutorial/ng-chapter-0
Apache License 2.0
1.21k stars 241 forks source link

ListView separatorColor="transparent" don't work #2213

Open lblase opened 4 years ago

lblase commented 4 years ago

Environment ✔ Component nativescript has 6.8.0 version and is up to date. ✔ Component tns-core-modules has 6.6.0-next-2020-05-08-112112-01 version and is up to date. ✔ Component tns-android has 6.5.3 version and is up to date. ✔ Component tns-ios has 6.5.2 version and is up to date.

Describe the bug I have my ListView inside ScrollView using ng-template to render dynamic content. I'm trying to remove the separatorColor with all the methods I know but no one works. image

Expected behavior I would like to remove the separator line between the elements in my ListView

Sample project

<ScrollView row="1" col="0">
            <ListView height="100%" [items]="menuItems" (itemLoading)="onItemLoading($event)" android:listSelector="@android:color/transparent" separatorColor="transparent">

                <ng-template nsTemplateKey="defaults" let-item="item">
                    <StackLayout orientation="vertical">
                        <GridLayout [id]="item.id" [class.-selected]="item.selected" columns="*" rows="auto, *" (tap)="onNavItemTap($event)">
                            <ImageCache col="0" row="0" styling="image" placeHolder="res://menu" errorHolder="res://menu" fallback="res://menu"
                                stretch="fill" width="50" height="50" [src]="item.icon"></ImageCache>
                            <Label [text]="item.label" col="0" row="1" class="text-center"></Label>
                        </GridLayout>
                    </StackLayout>
                </ng-template>

                <ng-template nsTemplateKey="webViews" let-item="item">
                    <StackLayout orientation="vertical">
                        <GridLayout [id]="item.id" [class.-selected]="item.selected" columns="*" rows="*" (tap)="onNavItemTap($event)">
                            <Label [text]="item.label" col="0" row="0"></Label>
                        </GridLayout>
                    </StackLayout>
                </ng-template>

            </ListView>
        </ScrollView>

Additional context Thanks all for the support.

lblase commented 4 years ago

UP!

LynX39 commented 4 years ago

Please, do you have a news of solutions? Thks.

lblase commented 4 years ago

UP!

iamabs2001 commented 3 years ago

working fine... Screenshot_20200930-101920