Currently i am using a custom layout with a FrameLayout(Preview) and 2 Buttons(Capture and Cancel), to take a picture using the Camera API.
setContentView(R.layout.camera_api);
final Button captureButton = (Button) findViewById(R.id.button_capture);
final Button cancelButton = (Button) findViewById(R.id.button_cancel);
captureButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
myCamera.takePicture(null, null, mPictureCallback);
}
cancelButton .setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
finish();
}
But is there a way i can use the Device’s default camera layout and track the capture and cancel buttons of it while disabling video etc..,
I only want the look of the default camera. Preview and event handlers i have them customized.
This is not possible the way you think of it. You can send an intent and let another camera-app do all the stuff for you. If the user has made the snapshot, the ready image is returned to you.
What you want to do is not possible because there is no default-camera-ui. There are many Android versions and many manufacturers with each providing a slightly different default camera app.