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

Support UITabBar customization #1576

Open drewcovi opened 6 years ago

drewcovi commented 6 years ago

Is your feature request related to a problem? Please describe. I'm able to implement TabView, however controls to UITabBarController are severely limited

Describe the solution you'd like Access to opacity and color controls

Describe alternatives you've considered I'm unable to find any workarounds at this point

tsonevn commented 6 years ago

Hi @drewcovi, Can you provide more info about the color controls, which you need? Currently, you can set up a color with a opacity to the component as follows: HTML

<GridLayout backgroundColor="green">
    <TabView id="tabViewContainer">
        <StackLayout *tabItem="{title: 'First Tab', iconSource: 'res://icon'}">
            <StackLayout>
                <Label text="First Tab" textWrap="true" class="m-15 h2 text-left" color="blue"></Label>
            </StackLayout>
        </StackLayout>
        <StackLayout *tabItem="{title: 'Second Tab', iconSource: 'res://icon'}">
            <StackLayout>
                <Label text="Second Tab" textWrap="true" class="m-15 h2 text-left" color="blue"></Label>
            </StackLayout>
        </StackLayout>
    </TabView>
</GridLayout>

CSS

TabView{
    background-color: rgba(255, 255, 255, 0.2);
}
drewcovi commented 6 years ago

Hi @tsonevn. Perhaps I’m missing some details. The ideal is a TabItem similar to those found in iOS apps with variable opacities and blur effect behind.

I’ve found various workarounds that don’t seem to stick that attempt to set these values OnInit or after navigation.

Ideally there’s also a path forward to support badges in the TabItem and elegant transitions between states.

drewcovi commented 5 years ago

@tsonevn am I missing some easy way to reduce opacity on the tabbar? Thanks in advance for any tips.

drewcovi commented 5 years ago

@tsonevn any more info I can provide here? tabBackgroundColor seems to be my only modifiable attribute... ideally we have access to alpha channel on the color and blur effect.

tsonevn commented 5 years ago

Hi @drewcovi, Excuse me for the delay in reply, Indeed there are some missing features for the TabView component, which prevents for achieving the needed styling. I will mark this issue as a feature request, and we will investigate further how we can extend the component styling functionality.