GlideUtils.kt 651 B

1234567891011121314151617181920212223
  1. package com.ytpm.qnjz.utils
  2. import android.content.Context
  3. import android.util.TypedValue
  4. import android.widget.ImageView
  5. class GlideUtils {
  6. fun roundImages(mContext: Context, resInt: String, view: ImageView, radius1: Int) {
  7. val radius = TypedValue.applyDimension(
  8. TypedValue.COMPLEX_UNIT_DIP,
  9. radius1.toFloat(),
  10. mContext.resources.displayMetrics
  11. ).toInt()
  12. GlideRoundedCorners.loadRoundedImage(mContext, resInt, view, radius)
  13. }
  14. fun circelImages(mContext: Context, resInt: String, view: ImageView){
  15. GlideRoundedCorners.loadCircleImage(mContext, resInt, view)
  16. }
  17. }