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