1. Yes, just call takePicture() from your onClickListener. 2. The preview will fill the surface you give it. Just make sure the aspect ratio matches preview size. On the G1, this is currently hard- coded to 480x320, so you want a 1.33333 aspect ratio for your preview surface.
On Jan 15, 1:05 am, Developer <shuo.yang.2...@gmail.com> wrote: > I have two questions about android's hardware camera API. > > 1) Is there a way to create a button that control camera snapshot? > i.e, when I push the button on the screen, the camera takes photo in > the same way as when I push the hardware button. > > 2) Can I make the preview-window showing how the photo will look like > in a small area (not full-screen size), so that I can place the > control button on the screen? > > Thanks, --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---