Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captured view not seen any more #14

Closed
billywanmf opened this issue Oct 5, 2016 · 4 comments
Closed

Captured view not seen any more #14

billywanmf opened this issue Oct 5, 2016 · 4 comments

Comments

@billywanmf
Copy link

Hi,

I successfully capture the view as png/jpeg in react-native in Android.

I captured the view as file and saved for later use. The view contain image and text. But the original view in the screen disappeared (become empty in the screen) after captured the view.

I want to display the same view (not captured image) even after captured the image. Any way to achieve this ? Please advise ASAP.

Please find attached the before view and after captured view (empty).

error-before
error-after

@gre
Copy link
Owner

gre commented Oct 5, 2016

can you share a minimal code that reproduce this? I'm not sure why it would disappear, seems weird to me, are you sure you keep rendering that view?

There is no such bug in https://github.com/gre/react-native-view-shot-example

@gre
Copy link
Owner

gre commented Oct 5, 2016

you might be right about this bug BTW, maybe it's not a good idea I do this without restoring back the layout:

https://github.com/gre/react-native-view-shot/blob/master/android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java#L119

(I guess it's a side effect in view?)

i'm not even sure if I need to to this? feel free to test without this line, check if result still get rendered too

@billywanmf
Copy link
Author

Hi Gaëtan,
It seems working now by removing the line you mentioned in java and the view remained inside the screen. Will further check if the capture image is ok later.

Thank you for your prompt feedback and support.

@gre
Copy link
Owner

gre commented Oct 5, 2016

cool, feel free to send a PR. i'll later check if there is no case this would break and crop with a wrong size (unless you want to do it ;))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants