Skip to content

Commit

Permalink
拍照增加自动对焦
Browse files Browse the repository at this point in the history
  • Loading branch information
wzgl5533 committed Jun 7, 2020
1 parent 08e1dd2 commit c90377e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ abstract class CameraBaseActivity : AppCompatActivity(), SurfaceHolder.Callback
private var cameraPosition =
Camera.CameraInfo.CAMERA_FACING_BACK //1:采集指纹的前置摄像头. 0:拍照的后置摄像头.
private var isGranted = false
private var cropBitmap: Bitmap? = null//最终拍照的裁剪图片
private var mHolder: SurfaceHolder? = null
private var maxPreSize: Camera.Size? = null
private var maxPicSize: Camera.Size? = null
Expand Down Expand Up @@ -318,7 +317,7 @@ abstract class CameraBaseActivity : AppCompatActivity(), SurfaceHolder.Callback
val frameRect = Rect()
val fixCutView = root?.findViewById<View>(R.id.fix_cut_view)
fixCutView?.getGlobalVisibleRect(frameRect)
cropBitmap = BitmapUtils.getCropPicture(originalBitmap,
val cropBitmap = BitmapUtils.getCropPicture(originalBitmap,
ScreenUtils.getScreenWidth(),
ScreenUtils.getScreenHeight(), frameRect)
//BitmapUtils.saveBitmap(this, originalBitmap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import android.graphics.Bitmap
*描述:
*/
interface TakePictureSuccess {
fun success(bitmap: Bitmap?)
fun success(cropBitmap: Bitmap?)
}

0 comments on commit c90377e

Please sign in to comment.