react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

WindowInsets.getRoundedCorner ja possible?

Open KULTI1995 opened this issue 3 years ago • 4 comments

Can the library get WindowInsets.getRoundedCorner (int position)? https://developer.android.com/develop/ui/views/theming/rounded-corners

Useful for e.g. introducing routing transition animations with rounded view edges. If it is possible to obtain these values with this library?

KULTI1995 avatar Oct 12 '22 17:10 KULTI1995

It is not currently implemented, but it could be possible to add there values.

janicduplessis avatar Oct 12 '22 18:10 janicduplessis

It is not currently implemented, but it could be possible to add there values.

how to do it?

KULTI1995 avatar Oct 12 '22 18:10 KULTI1995

I think it could be added here https://github.com/th3rdwave/react-native-safe-area-context/blob/main/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaContextModule.kt#L25. Feel free to have a look and open a PR to add it. If not I can try to have a look in the next few weeks.

janicduplessis avatar Oct 12 '22 18:10 janicduplessis

This library might also be a better option if you are willing to contribute the android implementation. https://github.com/mrousavy/react-native-screen-corner-radius/blob/master/README.md

janicduplessis avatar Oct 12 '22 18:10 janicduplessis

Agree - it's only a well defined thing on iOS, which gives you an accurate bezier path of the corner. Makes sense to have an iOS-only library handle this

jacobp100 avatar Jan 19 '23 10:01 jacobp100

I'll close this unless someone feels very strongly it should be in this library

jacobp100 avatar Jan 19 '23 16:01 jacobp100