Skip to content

fix(tabs) Change image colors on selected tab in IOS and android #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 27, 2021

Conversation

jcassidyav
Copy link
Contributor

Included in this pull request:

General:

  • Fix tsc-win commands in all packages ( / to // )
  • Add build.angular.win in all packages ( / to // again )
  • There is still an issue building and running everything unless a reference to @nativescript-community/ui-material-core package.json.

Demo-ng

  • update demo-angular to ns8
  • fix tabs xml so it shows up
  • Change tabs to use one font based image source

Fixes:

#274 font based images now change color when selected ( resource based images do not )
#282 Color change triggered when Tab selected.

I noticed two remaining issues.

  1. Non font based images don't change color when selected in IOS
  2. The line under the tab which shows which tab is selected doesn't honor the highlight-color CSS not sure if that is intended or not.

@farfromrefug
Copy link
Member

@jcassidyav pretty awesome! First thank you for updating the angular demo...
Now i think it is all i need to test it.
about your question of non fonticons images color. Did you use iosIconRenderingMode ? have you tried with alwaysTemplate?

@jcassidyav
Copy link
Contributor Author

@jcassidyav I thought that might be it but the code seems to select alwaysTemplate whenever there is a selected/unselected color specified so I'm thinking it is something else.

@farfromrefug
Copy link
Member

@jcassidyav that s why i want you to try and force it with alwaysTemplate

@jcassidyav
Copy link
Contributor Author

Maybe I am misunderstanding, but I set iosIconRenderingMode="alwaysTemplate" on the MDTabStrip and set the code in getIcon to always set rendermode to 2 and I'm still seeing the icon not change color.

@farfromrefug
Copy link
Member

@jcassidyav ok then it does not work. Will have to try it. Thanks

@jcassidyav
Copy link
Contributor Author

I don't think the change here has degraded / caused the issue with the images not changing color, would it be possible to just look at this pull request without regard to the images icon issue?

@farfromrefug farfromrefug merged commit c309971 into nativescript-community:master Apr 27, 2021
@farfromrefug
Copy link
Member

@jcassidyav it is now published thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants