-
Notifications
You must be signed in to change notification settings - Fork 659
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
RoundedCornersTransformation can support 4 various sizes #103
Conversation
Travis build keeps failing. @colinrtwhite can you help to take a look |
coil-base/src/main/java/coil/transform/RoundedCornersTransformation.kt
Outdated
Show resolved
Hide resolved
@@ -10,6 +10,7 @@ import androidx.lifecycle.Observer | |||
import androidx.recyclerview.widget.RecyclerView | |||
import androidx.recyclerview.widget.StaggeredGridLayoutManager | |||
import coil.api.load | |||
import coil.transform.RoundedCornersTransformation | |||
|
|||
class MainActivity : AppCompatActivity() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the changes to the sample app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
|
||
init { | ||
require(radius >= 0) { "Radius must be >= 0." } | ||
require(radii.size == 1 || radii.size == 4) { "Radii size has to be either 1 or 4" } | ||
require(radii.all { it >= 0 }) { "All radius must be >= 0." } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "All radii must be >= 0."
@khatv911 Try re-running the build again. Unfortunately, the Travis CI Android Emulator has been a bit flaky lately. |
make changes as reviewed. |
@khatv911 Thanks. Looks like |
@colinrtwhite thanks for the finding. I had a successful build now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for the contribution.
* RoundedCornersTransformation can support 4 various sizes in clockwise order * Fix lint issue * trigger a CI rebuild * code review changes * fix wrong corner order * remove reduntdant brace
RoundedCornersTransformation's constructor can accept one single Float value (all corners are equal) or 4 Float values as 4 different rounded radii.