Android: Is it possible to set overlay on camera if we use this code below?

StackOverflow https://stackoverflow.com/questions/23316857

  •  10-07-2023
  •  | 
  •  

سؤال

Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

mFileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);

i.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri);

startActivityForResult(i, CAMERA_CAPTURE_PHOTO_REQUEST_CODE);

I am trying to add a button on Camera Overlay, but most tutorials out there create a camera file that extends SurfaceView implements SurfaceHolder.Callback. While that way is great for implementing a custom camera, I realize you have to rebuild some buttons for taking photos. Please Correct me if I'm wrong.

I want to use the Android default camera buttons and just add an overlay view for one button on top. Is it possible to do that? Like i.setOverlay(View v...); or something like that. Any help will be grateful. Thanks in advance.

هل كانت مفيدة؟

المحلول

Is it possible to do that?

No, because that is not your app. That is somebody else's app. You cannot modify the UI of somebody else's app from your app.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top