YanYuanFE / react-native-signature-canvas

:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
MIT License
417 stars 149 forks source link

I cannot see what i'm drawing on android #329

Closed yepes closed 10 months ago

yepes commented 11 months ago

Hi I have created a small demo because I cannot have this library to work on android <31. The same code works on api 31, 32, 33 and 34.

The thing is that I cannot see what is being draw, but the data is there. This is on an emulator API 31:

image

This is the same on API 28:

image

As you can see, the data signature is there, you just can see it.

This is what I have in my package.json: "react": "18.2.0", "react-native": "0.72.4", "react-native-signature-canvas": "^4.6.1", "react-native-webview": "^13.6.0"

It's a bare RN project.

I created a repro repo here: https://github.com/yepes/signaturepad-demo

kvnlnt commented 11 months ago

same

yepes commented 11 months ago

I managed to test it on an real device on android api 29 and works on the real device, but de behaviour on the emulator is the described above

YanYuanFE commented 10 months ago

Sorry to keep you waiting. After this period of troubleshooting, I have determined the cause of the problem and released a new version to fix it.

npm i react-native-signature-canvas@4.7.1

and then,

set props androidLayerType to 'software' for fix it

<SignatureScreen androidLayerType={'software'}/>

yepes commented 10 months ago

@YanYuanFE I can confirm it works. The signature on android is not as crisp as in iOS, but yeah, it works.

Thanks