Lottie-android: Support rounded corners outside of a rectangle properties.

Created on 14 Feb 2017  路  5Comments  路  Source: airbnb/lottie-android

Most helpful comment

@MrNinja Yes, you can use an OutlineProvider on which you can setRoundedRect

All 5 comments

do you know how to set rounded corners?
thanks.

@tuchangwei roundedness is a property of a rectangle. That works.
image

@gpeal Could I programmatically create an rounded corner LottieAnimationView in Android like iOS?

    // Setup our image view with the rect and add rounded corners
    imageView.frame = imageRect
    imageView.layer.masksToBounds = true
    imageView.layer.cornerRadius = imageRect.width / 2;

@MrNinja Yes, you can use an OutlineProvider on which you can setRoundedRect

Thank you for your suggest. Let me read more about it.

Edit: I apply this suggestion into my project and It work. Thank you a lot.

Was this page helpful?
0 / 5 - 0 ratings