[4.0.0-beta 8] ion-tab color doesn't take primary color in android
See original GitHub issueBug Report
Ionic Info
ionic (Ionic CLI) : 4.1.1 (C:\Users\XXXX\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.8
@angular-devkit/core : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.1.5
@ionic/ng-toolkit : 1.0.7
@ionic/schematics-angular : 1.0.5
Describe the Bug In md mode, the ion-tab color doesn’t take the primary color as selected tab color. However in ios it’s working well.
Steps to Reproduce Only change the chrome debugger profile to some device with md and ios.
Related Code
theme/variables.scss
/** primary **/
--ion-color-primary: #f185cf;
--ion-color-primary-rgb: 72,138,255;
--ion-color-primary-contrast: #fff;
--ion-color-primary-contrast-rgb: 255,255,255;
--ion-color-primary-shade: #E359B8;
--ion-color-primary-tint: #E359B8;
tabs.component.html
<ion-tabs>
<ion-tab icon="home" href="/tabs/(home:home)" tabsHideOnSubPages="false">
<ion-router-outlet name="home"></ion-router-outlet>
</ion-tab>
<ion-tab icon="card" color="primary" href="/tabs/(offers:offers)" tabsHideOnSubPages="false">
<ion-router-outlet name="offers"></ion-router-outlet>
</ion-tab>
<ion-tab icon="heart" color="primary" badge="{{$numItemsInWishList > 0 ? $numItemsInWishList : '' }}"
href="/tabs/(wishlist:wishlist)" badgeColor="dark" tabsHideOnSubPages="false">
<ion-router-outlet name="wishlist"></ion-router-outlet>
</ion-tab>
<ion-tab icon="basket" color="primary" badge="{{$numItemsInCart > 0 ? $numItemsInCart : '' }}"
href="/tabs/(cart:cart)" badgeColor="dark" tabsHideOnSubPages="false">
<ion-router-outlet name="cart"></ion-router-outlet>
</ion-tab>
<ion-tab icon="contact" color="primary" href="/tabs/(profile:profile)" tabsHideOnSubPages="false">
<ion-router-outlet name="profile"></ion-router-outlet>
</ion-tab>
</ion-tabs>
Expected Behavior In md mode should take the primary color as expected.
Additional Context
IOS:
MD:
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
[4.0.0-beta 8] ion-tab color doesn't take primary color in android
In md mode, the ion-tab color doesn't take the primary color as selected tab color. However in ios it's working well. ... Only...
Read more >android - How do I change a tab background color when using ...
You can set app:tabIndicatorGravity="stretch" attribute to use as background. Example: <android.support.design.widget.TabLayout android:id="@+id/ ...
Read more >What's new in Unity 2021.1.0 Beta 8
Shadergraph: Fixed an issue with the Gradient color picker displaying ... a script doesn't properly take effect on asset import workers.
Read more >flutter_inappwebview 5.0.5+2 | Flutter Package - Pub.dev
A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window....
Read more >Migrating to v4 - Bootstrap
*-light , matching our color schemes used elsewhere. Responsive tables now generate classes for each grid breakpoint. This breaks from Beta 1 in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@marticrespi The developers wrote this next to the iOS Tabbar color:
"// TODO fallback $tabbar-text-color-active"
So I think they will make the ios mode to the md mode (and so you have to change --ion-tabbar-text-color-active as @jytx wrote
You can change the variable like: --ion-tabbar-text-color-active : #f185cf; Then it will be changed