Skip to content

Picasso

WARNING

قبل استخدام Transform، تأكد من أنك قد قمت بدمج مكتبة Picasso.

groovy
dependencies {
    // تبعيات QmBlurView Transform
    implementation 'com.qmdeve.blurview:transform:1.1.3'

    // تبعيات Picasso
    implementation 'com.squareup.picasso:picasso:2.8'
}

استيراد الفئة

java
// الفئة الرئيسية لـ Picasso
import com.squareup.picasso.Picasso;

// فئة تحويل التمويه لـ QmBlurView
import com.qmdeve.blurview.transform.picasso.BlurTransformation;

مثال على الاستخدام

java
Picasso.get()
         .load(R.drawable.image)
         .fit()
         .centerCrop()
         .transform(

            /**
            * استخدام تحويل التمويه
            * استيراد الفئة: com.qmdeve.blurview.transform.picasso.BlurTransformation
            *
            * new BlurTransformation() // نصف قطر التمويه الافتراضي 25f، زوايا دائرية 0
            * new BlurTransformation(float blurRadius) // نصف قطر التمويه المخصص، بدون زوايا دائرية
            * new BlurTransformation(float blurRadius, float roundedCorners) // نصف قطر التمويه المخصص وزوايا دائرية
            */
            new BlurTransformation(25f, 50)
         )
         .into(imageView);

البناءة

البناءالوصف
BlurTransformation()يخلق تحويلًا蒙蒙ًا بنصف قطر التمويه الافتراضي 25f وبدون زوايا دائرية
BlurTransformation(float blurRadius)يخلق تحويلًا蒙蒙ًا بنصف قطر التمويه المخصص وبدون زوايا دائرية
BlurTransformation(float blurRadius, float roundedCorners)يخلق تحويلًا蒙蒙ًا بنصف قطر التمويه المخصص وزوايا دائرية مخصصة