ramya0072
ramya0072

Reputation: 56

How to change segmentBar active Text color in NativeScript Angular 2 Mobile App

I want to change text and border color of active segmentBarItem . Please check the attached Image.

<SegmentedBar class="m-5" #sb [items]="Items"      
    (selectedIndexChange)="onChange(sb.selectedIndex)" borderWidth="0"    
    borderColor="#c2d500" selectedBackgroundColor="green" 
    [items]="[{title: 'News'}, {title: 'Events'}, {title: 'Scan History'}]" 
    borderRadius="0">
</SegmentedBar>

I want to change the selectedColor to black. Now its default active segmentBar text color is white

Layout Image

Upvotes: 0

Views: 657

Answers (1)

Nick Iliev
Nick Iliev

Reputation: 9670

The thing is that Segmented bar and selectedbackgroundColor will behave as the native components would. In this case for iOS, the selectedbackgroundColor will change the color of the tapped bar. However, for Android, the selectedbackgroundColor will only change the color of the underline for the tapped bar.

Upvotes: 1

Related Questions