Skip to content
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

Fix blending of Indicator Colors #856

Merged
merged 1 commit into from
Aug 28, 2020
Merged

Conversation

cortinico
Copy link
Member

Currently, we blend the user provided colors for the Dot indicator with appintro_default_unselected_color. That color has a transparency leading to sometimes unexpected behavior.

I'm cleaning up the way how we blend colors for indicators. Now the indicator has a white background and is tinted using:

  • appintro_default_unselected_color for unselected indicator, if not specified
  • appintro_default_selected_color for selected indicator, if not specified
  • The user provided colors will override those colors and no blending will happen.

I've also cleaned up the code a bit as we were using some deprecated functions + we were re-inflating the indicator drawable for every call to selectPosition. Now is way more streamlined.

Fixes #855

@cortinico cortinico added the enhancement Issue/PR related to a new feature for the library label Aug 27, 2020
@cortinico cortinico added this to the 6.1.0 milestone Aug 27, 2020
@cortinico cortinico requested a review from paolorotolo August 27, 2020 12:49
Copy link
Member

@paolorotolo paolorotolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@paolorotolo paolorotolo merged commit 86f7fa6 into master Aug 28, 2020
@paolorotolo paolorotolo deleted the nc/fix-color-blend-indicator branch August 28, 2020 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR related to a new feature for the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setIndicatorColor does not change indicator color unless I override appintro_default_unselected_color
2 participants