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

Sample: Use consistent name for flipping options. #389

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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