nativescript-camera icon indicating copy to clipboard operation
nativescript-camera copied to clipboard

Cancel event

Open konradkluzniak opened this issue 6 years ago • 5 comments

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.

konradkluzniak avatar Jan 28 '19 12:01 konradkluzniak

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

NickIliev avatar Jan 28 '19 12:01 NickIliev

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

<Frame defaultPage="sign/sign" id="dashboard" class="c2"></Frame>

<!--<Frame defaultPage="sign/sign" id="dashboard" class="c2"></Frame>-->
<GridLayout row="1" class="xx">
    <StackLayout verticalAlignment="bottom" row="2" class="bottom-nav">
        <GridLayout rows="*" columns="*,*,*,*,*,*" height="70" id="main-ic0">
            <Label class="icon0 foot-icon" row="0" col="0" tap="{{ loadPage }}"  data-id="0" id="ico0"></Label>
            <Label class="icon1 foot-icon" row="0" col="1" tap="{{ loadPage }}"  data-id="1" id="ico1"></Label>
            <Label class="icon2 foot-icon" row="0" col="2" tap="{{ loadPage }}"  data-id="2" id="ico2"></Label>
            <Label class="icon3 foot-icon" row="0" col="3" tap="{{ loadPage }}"  data-id="3" id="ico3"></Label>
            <Label class="icon5 foot-icon" row="0" col="4" tap="{{ loadPage }}"  data-id="5" id="ico4"></Label>
            <Label class="icon4 foot-icon" row="0" col="5" tap="{{ loadPage }}"  data-id="4" id="ico5"></Label>
        </GridLayout>
    </StackLayout>
</GridLayout>

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 avatar Jan 28 '19 13:01 konradkluzniak

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

konradkluzniak avatar Jan 30 '19 10:01 konradkluzniak

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.

konradkluzniak avatar Jan 30 '19 11:01 konradkluzniak

@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.

VladimirAmiorkov avatar Feb 08 '19 07:02 VladimirAmiorkov