Android-Image-Cropper icon indicating copy to clipboard operation
Android-Image-Cropper copied to clipboard

Bugfix/437 setting toolbar color to white does nothing

Open Devenom1 opened this issue 1 year ago • 0 comments

close #437

Added customizations to toolbar colors [New Feature]

Description:

Users can not customize toolbar colors of back button, title and menu texts.

Check list for the Code Reviewer:

  • [x] CHANGELOG
  • [ ] README
  • [ ] Wiki
  • [ ] Version Number

Fixed and issue where setting white color to toolbar would do nothing [Bug]

Bug

Setting white color as the toolbar color would do nothing

Cause:

A default of -1 was used as the toolbar color which conflicted with the value of Color.WHITE in the android source code. So when we checked if Color.WHITE i.e. -1 was set this would assume that no color was set to the toolbar.

Reproduce

Set toolbar color to Color.WHITE. This should set the toolbar color to white. But the toolbar will remain the original color i.e. the primary color set in the styles which is currently Purple.

How the bug was solved:

Set the default color to null instead of -1.

screenshot

Devenom1 avatar Sep 15 '22 15:09 Devenom1