From dea8e18edaff4ab89b68b0e2ea605360c46ed7e0 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 14 Feb 2020 00:27:55 -0800 Subject: [PATCH] Increase Glide cache size, Fixed extension/broswe catalogue filter buttons --- .../eu/kanade/tachiyomi/data/glide/TachiGlideModule.kt | 4 ++-- .../ui/catalogue/browse/CatalogueNavigationView.kt | 6 ++++++ .../eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt | 3 +-- app/src/main/res/drawable/button_bg_transparent.xml | 7 +------ app/src/main/res/layout/catalogue_drawer_content.xml | 9 +++++++-- app/src/main/res/layout/extension_card_item.xml | 3 +-- app/src/main/res/layout/extension_detail_controller.xml | 1 + app/src/main/res/layout/navigation_view_text.xml | 6 +++--- 8 files changed, 22 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/glide/TachiGlideModule.kt b/app/src/main/java/eu/kanade/tachiyomi/data/glide/TachiGlideModule.kt index 77faee50a0..4b57d19347 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/glide/TachiGlideModule.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/glide/TachiGlideModule.kt @@ -27,9 +27,9 @@ import java.io.InputStream class TachiGlideModule : AppGlideModule() { override fun applyOptions(context: Context, builder: GlideBuilder) { - builder.setDiskCache(InternalCacheDiskCacheFactory(context, 50 * 1024 * 1024)) + builder.setDiskCache(InternalCacheDiskCacheFactory(context, 100 * 1024 * 1024)) builder.setDefaultRequestOptions(RequestOptions().format(DecodeFormat.PREFER_RGB_565)) - val memoryCacheSizeBytes = 1024 * 1024 * 100 // 1000mb + val memoryCacheSizeBytes = 1024 * 1024 * 100 // 100mb builder.setMemoryCache(LruResourceCache(memoryCacheSizeBytes.toLong())) /* builder.setDefaultTransitionOptions( diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueNavigationView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueNavigationView.kt index b467213418..6a62e0792b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueNavigationView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/CatalogueNavigationView.kt @@ -6,7 +6,9 @@ import android.view.ViewGroup import eu.davidea.flexibleadapter.FlexibleAdapter import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.R +import eu.kanade.tachiyomi.util.view.RecyclerWindowInsetsListener import eu.kanade.tachiyomi.util.view.inflate +import eu.kanade.tachiyomi.util.view.updatePaddingRelative import eu.kanade.tachiyomi.widget.SimpleNavigationView import kotlinx.android.synthetic.main.catalogue_drawer_content.view.* @@ -31,6 +33,10 @@ class CatalogueNavigationView @JvmOverloads constructor(context: Context, attrs: title.text = context.getString(R.string.source_search_options) search_btn.setOnClickListener { onSearchClicked() } reset_btn.setOnClickListener { onResetClicked() } + view.search_layout.setOnApplyWindowInsetsListener { v, insets -> + view.updatePaddingRelative(bottom = insets.systemWindowInsetBottom) + insets + } } fun setFilters(items: List>) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt index 99ad2f5794..d3b5aea23c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionHolder.kt @@ -61,9 +61,8 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) : isClickable = true isActivated = false - //background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null) setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_text_state)) - backgroundTintList = ContextCompat.getColorStateList(context, R.color.button_bg) + backgroundTintList = ContextCompat.getColorStateList(context, android.R.color.transparent) val extension = item.extension diff --git a/app/src/main/res/drawable/button_bg_transparent.xml b/app/src/main/res/drawable/button_bg_transparent.xml index 8fc57a2aee..a9e82645b7 100644 --- a/app/src/main/res/drawable/button_bg_transparent.xml +++ b/app/src/main/res/drawable/button_bg_transparent.xml @@ -1,11 +1,6 @@ - - - - - - + diff --git a/app/src/main/res/layout/catalogue_drawer_content.xml b/app/src/main/res/layout/catalogue_drawer_content.xml index 450078cab4..9c1b558f55 100644 --- a/app/src/main/res/layout/catalogue_drawer_content.xml +++ b/app/src/main/res/layout/catalogue_drawer_content.xml @@ -27,7 +27,7 @@ android:maxLines="1" tools:text="Title" android:textAppearance="@style/TextAppearance.AppCompat.Body2" - android:textColor="@color/md_white_1000"/> + android:textColor="?attr/actionBarTintColor"/> @@ -44,10 +44,14 @@ android:background="?android:attr/divider"/> + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:paddingTop="8dp" + tools:paddingBottom="20dp">