Sample: Showcase 2:1 aspect ratio#386
Conversation
|
|
||
| binding.ratio.chipSixteenNine.setOnClickListener { | ||
| options = options.copy(ratio = Pair(9, 16)) | ||
| options = options.copy(ratio = Pair(16, 9)) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
|
|
||
| binding.ratio.chipSixteenNine.setOnClickListener { | ||
| options = options.copy(ratio = Pair(9, 16)) | ||
| options = options.copy(ratio = Pair(16, 9)) |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
| when (options.ratio) { | ||
| Pair(1, 1) -> binding.ratio.chipOneOne.isChecked = true | ||
| Pair(4, 3) -> binding.ratio.chipFourThree.isChecked = true | ||
| Pair(2, 1) -> binding.ratio.chipTwoOne.isChecked = true |
There was a problem hiding this comment.
We can add a new one, but let's not remove 4:3
|
On another note, we need to update the CHANGELOG |
With what? |
| binding.ratio.chipFourThree.setOnClickListener { | ||
| options = options.copy(ratio = Pair(16, 9)) | ||
| options = options.copy(ratio = Pair(4, 3)) | ||
| } |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
| binding.ratio.chipFourThree.setOnClickListener { | ||
| options = options.copy(ratio = Pair(16, 9)) | ||
| options = options.copy(ratio = Pair(4, 3)) | ||
| } |
Check warning
Code scanning / detekt
Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
Add ratio |
|
Will do once the other PR is merged, otherwise I get conflicts in the changelog file |
* CropImageOptions: Option to change progress bar color.
Canato
left a comment
There was a problem hiding this comment.
Some merge conflicts. Request changes so you get notify

Also the previous code did things different than the text shown in the UI