Skip to content

Commit

Permalink
* Version 5.0.2 Done
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyu-ayaan committed Aug 26, 2023
1 parent abf352a commit 746cb23
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ navigation-safe-args-gradle-plugin = { module = "androidx.navigation:navigation-
navigation-common-ktx = { module = "androidx.navigation:navigation-common-ktx", version.ref = "navigation-ui" }
navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation-ui" }
navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation-ui" }
play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" }
#play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" }
recycler-view = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recycler-view" }
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit-version" }
retrofit-json = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit-version" }
Expand Down
4 changes: 2 additions & 2 deletions theme/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
implementation(libs.glide)

implementation(libs.core.splashscreen)

implementation(libs.play.services.ads)
//
// implementation(libs.play.services.ads)

}
18 changes: 8 additions & 10 deletions theme/src/main/java/com/atech/theme/imageLoad.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.target.Target
import com.bumptech.glide.request.transition.DrawableCrossFadeFactory
import com.bumptech.glide.request.transition.Transition
import kotlinx.coroutines.Deferred
Expand Down Expand Up @@ -83,24 +84,21 @@ fun String.loadImageBitMap(
) {
Glide.with(parentView).asBitmap().load(this@loadImageBitMap).error(errorImage)
.listener(object : RequestListener<Bitmap> {

override fun onLoadFailed(
e: GlideException?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Bitmap>?,
target: Target<Bitmap>,
isFirstResource: Boolean
): Boolean = false


override fun onResourceReady(
resource: Bitmap?,
model: Any?,
target: com.bumptech.glide.request.target.Target<Bitmap>?,
dataSource: DataSource?,
resource: Bitmap,
model: Any,
target: Target<Bitmap>?,
dataSource: DataSource,
isFirstResource: Boolean
): Boolean {
customAction?.invoke(resource)
return false
}
): Boolean = false

}).submit(100, 100)
}

0 comments on commit 746cb23

Please sign in to comment.