Ilja
Ilja

Reputation: 46547

MaskedViewIOS alternative for android?

I am trying to find or figure out a way to create https://facebook.github.io/react-native/docs/maskedviewios.html that supports Android, with the main goal to mask image with another image outline (think twitter logo put over any photo where contents are only shown within twitter logo) This works fine in iOS, but there are no components I found that do similar job on Android. How would one go about creating this?

Upvotes: 1

Views: 1645

Answers (2)

wcandillon
wcandillon

Reputation: 2176

In a lot of cases, you use ClipPath from react native svg (shipped by default with expo) to do the job. Such example can be found here: https://snack.expo.io/@wcandillon/soundcloud-player

Upvotes: 1

Moti Azu
Moti Azu

Reputation: 5442

Find a masked view built in Android (or build one) and the hook the native implementation to React Native.

Upvotes: 1

Related Questions