| | |
| | | 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 |
| | |
| | | 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)) |