Skip to content

Commit

Permalink
Sample: Use consistent name for flipping options.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech authored and Canato committed Jun 17, 2022
1 parent 5a6701f commit 612ff9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ internal class SampleUsingImageView :
resetCropRect()
options = options?.copy(
scaleType = CropImageView.ScaleType.FIT_CENTER,
flipHorizontal = false,
flipHorizontally = false,
flipVertically = false,
autoZoom = true,
maxZoomLvl = 2
Expand Down Expand Up @@ -104,7 +104,7 @@ internal class SampleUsingImageView :
isShowProgressBar = options.showProgressBar
isAutoZoomEnabled = options.autoZoom
maxZoom = options.maxZoomLvl
isFlippedHorizontally = options.flipHorizontal
isFlippedHorizontally = options.flipHorizontally
isFlippedVertically = options.flipVertically
isShowCropLabel = options.showCropLabel
}
Expand Down Expand Up @@ -191,7 +191,7 @@ internal class SampleUsingImageView :
centerMove = true,
showCropOverlay = true,
showProgressBar = true,
flipHorizontal = false,
flipHorizontally = false,
flipVertically = false,
showCropLabel = false
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internal class SampleOptionsBottomSheet : BottomSheetDialogFragment() {
binding.centerMoveEnabled.toggle.isChecked = options.centerMove
binding.cropOverlay.toggle.isChecked = options.showCropOverlay
binding.progressBar.toggle.isChecked = options.showProgressBar
binding.flipHorizontal.toggle.isChecked = options.flipHorizontal
binding.flipHorizontal.toggle.isChecked = options.flipHorizontally
binding.flipVertical.toggle.isChecked = options.flipVertically
binding.cropLabelText.toggle.isChecked = options.showCropLabel
}
Expand All @@ -134,7 +134,7 @@ internal class SampleOptionsBottomSheet : BottomSheetDialogFragment() {
centerMove = true,
showCropOverlay = true,
showProgressBar = true,
flipHorizontal = false,
flipHorizontally = false,
flipVertically = false,
showCropLabel = true
)
Expand Down Expand Up @@ -237,7 +237,7 @@ internal class SampleOptionsBottomSheet : BottomSheetDialogFragment() {
}

binding.flipHorizontal.toggle.setOnCheckedChangeListener { _, isChecked ->
options = options.copy(flipHorizontal = isChecked)
options = options.copy(flipHorizontally = isChecked)
}

binding.flipVertical.toggle.setOnCheckedChangeListener { _, isChecked ->
Expand All @@ -255,6 +255,7 @@ internal class SampleOptionsBottomSheet : BottomSheetDialogFragment() {
binding.progressBar.toggle.setOnCheckedChangeListener { _, isChecked ->
options = options.copy(showProgressBar = isChecked)
}

binding.cropLabelText.toggle.setOnCheckedChangeListener { _, isChecked ->
options = options.copy(showCropLabel = isChecked)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal data class SampleOptionsEntity(
val centerMove: Boolean,
val showCropOverlay: Boolean,
val showProgressBar: Boolean,
val flipHorizontal: Boolean,
val flipHorizontally: Boolean,
val flipVertically: Boolean,
val showCropLabel: Boolean
) : Parcelable

0 comments on commit 612ff9a

Please sign in to comment.