riku
2021-02-25 e102578ebfc95c27aeb13dce13fb82af53a2bead
app/src/main/java/cn/flightfeather/thirdapp/module/base/BaseTakePicActivity.kt
@@ -12,6 +12,7 @@
import cn.flightfeather.thirdapp.util.UUIDGenerator
import cn.flightfeather.thirdapp.util.file.FileUtil
import cn.flightfeather.thirdapp.util.photo.PhotoUtil
import com.bumptech.glide.Glide
import com.lcw.library.imagepicker.ImagePicker
import org.jetbrains.anko.toast
import java.io.File
@@ -91,9 +92,11 @@
            when {
                i < picSize -> {
                    imageViewList[i].setOnClickListener(viewPhotoClickListener(i))
                    // fixme: 2019/8/2 此处给imageVIew设置图片在原代码中是自定义了一个AsyncTask,之后可以用Glide等第三方框架替代
                    imageViewList[i].scaleType = ImageView.ScaleType.CENTER_CROP
                    SetImageTask(pathTempList[i].first, imageViewList[i]).execute()
                    Glide.with(this)
                            .load(pathTempList[i].first)
                            .placeholder(R.drawable.icon_add_photo_waite)
                            .into(imageViewList[i])
                }
                i == picSize -> imageViewList[i].run {
                    setOnClickListener(takePhotoClickListener(i))