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))
@@ -130,7 +133,7 @@
        return View.OnClickListener {
            val t = imageViewList.size - pathTempList.size
            val picNum = if (t >= 0) t else 0
            PhotoUtil.pickPhoto(this, TAKE_PHOTO, picNum)
            PhotoUtil.pickPhoto2(this, TAKE_PHOTO, picNum)
        }
    }