CropImageOptions: Option to change progress bar color. - #390
Conversation
Canato
left a comment
There was a problem hiding this comment.
Please update the CHANGELOG so we can merge this
| scaleType = CropImageView.ScaleType.FIT_CENTER | ||
| showCropOverlay = true | ||
| showProgressBar = true | ||
| progressBarColor = Color.rgb(153, 51, 153) |
There was a problem hiding this comment.
Nice work, just last bit, let's extract this value for const/static value so our Code Scanning get happier XD
There was a problem hiding this comment.
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.
Do you think that in this context on a function call of rgb the values 153, 51 and 153 are unclear of their purpose?
There was a problem hiding this comment.
I don't know what color is 153, 51, 153 but if you have something like
val PURPLE = Color.rgb(153, 51, 153) will make it easier to understand and reuse in the case is needed.
There was a problem hiding this comment.
Ah okay that makes sense. I think those errors will still appear though :/
| import com.canhub.cropper.CropImageView.Guidelines | ||
| import com.canhub.cropper.CropImageView.RequestSizeOptions | ||
|
|
||
| private val COLOR_PURPLE = Color.rgb(153, 51, 153) |
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.
| import com.canhub.cropper.CropImageView.Guidelines | ||
| import com.canhub.cropper.CropImageView.RequestSizeOptions | ||
|
|
||
| private val COLOR_PURPLE = Color.rgb(153, 51, 153) |
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.
| import com.canhub.cropper.CropImageView.Guidelines | ||
| import com.canhub.cropper.CropImageView.RequestSizeOptions | ||
|
|
||
| private val COLOR_PURPLE = Color.rgb(153, 51, 153) |
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.
No description provided.