优化
This commit is contained in:
@@ -424,7 +424,7 @@ class GoodsStoreDialog(
|
||||
|
||||
override fun show() {
|
||||
super.show()
|
||||
if (funcType == 1) {
|
||||
// if (funcType == 1) {
|
||||
takePhotoBinding?.let {
|
||||
cameraUtils.setPreviewController(previewView)
|
||||
cameraUtils.bind()
|
||||
@@ -434,7 +434,7 @@ class GoodsStoreDialog(
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
binding.root.postDelayed({
|
||||
SensorScaleUtils.startScale()
|
||||
}, 2600)
|
||||
@@ -455,7 +455,7 @@ class GoodsStoreDialog(
|
||||
private var imagePreviewBinding: LayoutImagePreviewBinding? = null
|
||||
private fun addChildToContainer() {
|
||||
val inflater = LayoutInflater.from(context)
|
||||
if (funcType == 1) {
|
||||
// if (funcType == 1) {
|
||||
//预览及拍照
|
||||
takePhotoBinding = LayoutTakePhotoBinding.inflate(inflater, binding.flContainer, true)
|
||||
activity?.unBindCamera()
|
||||
@@ -466,7 +466,7 @@ class GoodsStoreDialog(
|
||||
takePhotoBinding?.let {
|
||||
previewView = it.previewView
|
||||
it.flCameraPreview.visible()
|
||||
it.cvImageBg.gone()
|
||||
// it.cvImageBg.gone()
|
||||
// it.btnStartPreview.setOnClickListener { _ ->
|
||||
// it.cvImageBg.gone()
|
||||
// it.flCameraPreview.visible()
|
||||
@@ -475,8 +475,7 @@ class GoodsStoreDialog(
|
||||
// cameraUtils.takePhoto(takePhotoCallback)
|
||||
// }
|
||||
}
|
||||
return
|
||||
}
|
||||
if(funcType != 1){
|
||||
//只显示原始图片
|
||||
imagePreviewBinding = LayoutImagePreviewBinding.inflate(inflater, binding.flContainer)
|
||||
imagePreviewBinding?.imageView?.load(goods.relativeUrl) {
|
||||
@@ -491,6 +490,7 @@ class GoodsStoreDialog(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var imageFile: File? = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user