Nativescript: How to set background color of tab-view?

Created on 1 Mar 2017  路  4Comments  路  Source: NativeScript/NativeScript

I want to change color of tab-item background. I have applied css also but not successful.

Any help?

add services

just like this

question

Most helpful comment

Hey @SumanSingh4, how did you do that fancy tab pointer below the tab? :)

All 4 comments

Use _tabBackgroundColor_ to set the primary color of your tabs and use _tabTextColor_ to set the primary text color of your tabs.

There are also selectedTabTextColor to set the text color of the selected tab.

<TabView id="tabViewContainer" tabBackgroundColor="red" tabTextColor="white">
    <TabView.items>
        <TabViewItem title="Tab 1" >
            <TabViewItem.view>
                <Label text="This is Label in Tab 1" />
            </TabViewItem.view>
        </TabViewItem>
        <TabViewItem title="Tab 2">
            <TabViewItem.view>
                <Label text="This is Label in Tab 2" />
            </TabViewItem.view>
        </TabViewItem>
    </TabView.items>
</TabView>

I got it.

Thanxx

Hey @SumanSingh4, how did you do that fancy tab pointer below the tab? :)

no gradient background ? i have a gradient actionbar!

Was this page helpful?
0 / 5 - 0 ratings