Hi Pedro,

one possible way is to do it with gestures as nikhil suggested, although
there might be some other ways. Do you happen to display the camera preview
on the screen when you want the tapping to happen? If so, I suppose you have
it inside some SurfaceHolder. Now I'm not sure, but I think SurfaceHolder
doesn't have onClick or similar method, but on the other hand I'm sure you
can put the SurfaceHolder inside some View that supports the onClick method.
Then just override it to take a picture.

Best regards,
Filip Havlicek

2010/8/24 Pedro Teixeira <[email protected]>

> I have a CameraPicture.Callback and the onClick method implemented like
> this:
>
> public void onClick(View arg0) {
> tnnCamera.takePicture(null, mPictureCallback, mPictureCallback);
> }
>
> So does it makes any sense?
>
> Sorry.. I just have no ideia where to start this..
>
> On Aug 24, 2010, at 4:21 PM, nikhil wrote:
>
> your class should implement Gesture Listener
>
> and then override  onClickEvent
>
> On Aug 24, 9:56 am, Pedro Teixeira <[email protected]> wrote:
>
> Hi,
>
>
> My question is a little bit silly but..
>
>
> I know how to set a listener for.. let's say a button or a editext so
>
> that when clicked some action happens:
>
>
> buttonOReditextl.setOnClickListener(new View.OnClickListener() {
>
>                         @Override
>
>                         public void onClick(View view) {
>
>                         Action goes here
>
>                         }
>
>                 });
>
>
> My question is... how can I set a onClick event for when the user taps/
>
> clicks on the screen? or the surface.. I'm not sure? I want a picture
>
> to be taken when the camera is on.. but don't know how to make a
>
> listener to all the camera view instead of having a button to take a
>
> picture.
>
>
> Thank you
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
>
> Pedro Teixeira
>
> www.pedroteixeira.org
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to