Skip to content

Commit

Permalink
Fix error with type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
tiembo authored and florina-muntenescu committed Oct 21, 2018
1 parent 9a561d6 commit ee69807
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ShotActivity : AppCompatActivity() {
Palette.from(bitmap)
.clearFilters() /* by default palette ignore certain hues
(e.g. pure black/white) but we don't want this. */
.generate { palette -> applyFullImagePalette(palette) }
.generate { palette -> applyFullImagePalette(palette!!) }

val twentyFourDip = TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
Expand All @@ -98,7 +98,7 @@ class ShotActivity : AppCompatActivity() {
.clearFilters()
.setRegion(0, 0, bitmap.width - 1, twentyFourDip) /* - 1 to work around
https://code.google.com/p/android/issues/detail?id=191013 */
.generate { palette -> applyTopPalette(bitmap, palette) }
.generate { palette -> applyTopPalette(bitmap, palette!!) }

// TODO should keep the background if the image contains transparency?!
binding.shot.background = null
Expand Down

0 comments on commit ee69807

Please sign in to comment.