From b79855c01dcbea5fbbf334e3484cb18112a66e2c Mon Sep 17 00:00:00 2001 From: inorichi Date: Wed, 9 Aug 2017 12:38:54 +0200 Subject: [PATCH] Remove circle image view dependency --- app/build.gradle | 1 - .../eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt | 2 ++ .../java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt | 2 ++ app/src/main/res/layout/catalogue_list_item.xml | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c274c7ed9c..187fccf8c6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -190,7 +190,6 @@ dependencies { compile 'com.github.amulyakhare:TextDrawable:558677e' compile 'com.afollestad.material-dialogs:core:0.9.4.5' compile 'me.zhanghai.android.systemuihelper:library:1.0.0' - compile 'de.hdodenhof:circleimageview:2.1.0' compile 'com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.0.4' // Conductor diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt index 2a4f299a5d..5b782b1679 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/CatalogueListHolder.kt @@ -6,6 +6,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.util.getResourceColor +import jp.wasabeef.glide.transformations.CropCircleTransformation import kotlinx.android.synthetic.main.catalogue_list_item.view.* /** @@ -42,6 +43,7 @@ class CatalogueListHolder(private val view: View, adapter: FlexibleAdapter<*>) : .load(manga) .diskCacheStrategy(DiskCacheStrategy.SOURCE) .centerCrop() + .bitmapTransform(CropCircleTransformation(view.context)) .dontAnimate() .skipMemoryCache(true) .placeholder(android.R.color.transparent) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt index b9071cbd30..6de8995323 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt @@ -5,6 +5,7 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.engine.DiskCacheStrategy import eu.davidea.flexibleadapter.FlexibleAdapter import eu.kanade.tachiyomi.data.database.models.Manga +import jp.wasabeef.glide.transformations.CropCircleTransformation import kotlinx.android.synthetic.main.catalogue_list_item.view.* /** @@ -50,6 +51,7 @@ class LibraryListHolder( .load(manga) .diskCacheStrategy(DiskCacheStrategy.RESULT) .centerCrop() + .bitmapTransform(CropCircleTransformation(itemView.context)) .dontAnimate() .into(itemView.thumbnail) } diff --git a/app/src/main/res/layout/catalogue_list_item.xml b/app/src/main/res/layout/catalogue_list_item.xml index dac38717a4..f801b3f369 100644 --- a/app/src/main/res/layout/catalogue_list_item.xml +++ b/app/src/main/res/layout/catalogue_list_item.xml @@ -6,7 +6,7 @@ android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:background="?attr/selectable_list_drawable"> -