callstack / callstack/masked-view

[Android] - Doesn't handle correctly Images as mask

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

# Bug

If you are using Images in the maskElement, it won't load it, like if it doesn't update the ImageView cache. but if I use it once. But then, if I do a Fast Refresh of React native. it will shows up.

So basically if I want this to work, I have to:
- Create a "Dummy MaskedView" which will have all the image masks I'm using. so it can load in the cache.
- Put the dummy in my fist screen (Which doesn't contain any MaskedView in its rendering)

and now, when I'm navigating to another screen with MaskedView, it will works as it should. This temporary fix only works with local images, URI just dont work with MaskedView

## Environment info
Fresh project with nothing but masked-view
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5

Tested on :
- Pixel 3X 28 API - EMULATOR
- S7 23 & 24 API - EMULATOR
- S9 + 29 API - PHYSICAL

React native info output: N/A

Library version: "@react-native-community/masked-view": "^0.1.7"

## Steps To Reproduce

1. Use in maskElement
2. First run the app
3. then R-R (reload) or quick refresh

Describe what you expected to happen:

1. Render bottom mask which make a fading effect.

## Reproducible sample code

[Git Example](https://github.com/Khashan/MaskedViewTestExample)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.