NativeScript / nativescript-camera

NativeScript plugin to empower using device camera.
Apache License 2.0
92 stars 47 forks source link

Cancel event #165

Open konradkluzniak opened 5 years ago

konradkluzniak commented 5 years ago

Cancel Event

Hi. I'm trying to find anything in the docs that point me in the right direction but i'm unable to find anything, so i want to ask, if it's any way to capture an event when user tapped Cancel text instead of doing a photo ? Thank you.

NickIliev commented 5 years ago

@konradkluzniak there is no cancel event. Marking this one as a feature request

konradkluzniak commented 5 years ago

Thank you Nick. I have some bottom navigation that is present in root frame.

It's ever present and this means that this bottom nav overlaps camera that photo button. So, on takePicture option i set this

ff.parent.getViewById('nawRows').rows='*,0';

And after photo is captured im doing this:

ff.parent.getViewById('nawRows').rows='*,60';

to show nav again, but when you press cancel, nav is still hidden, so CancelEvent would be helpful as i could show nav again, if user tap cancel...

konradkluzniak commented 5 years ago

Or maybe there is any way just to remove this Cancel text ? Thank you.

konradkluzniak commented 5 years ago

I've noticed that takePicture() catch exception is thrown when Cancel is pressed so my issue is resolved as i can use this catch to do what i need. Cheers.

VladimirAmiorkov commented 5 years ago

@konradkluzniak Thank you for sharing your solution with us. I am leaving this thread open for now, we will see how we can improve this functionality as soon as possible.