mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 21:01:51 +01:00
Increase Glide cache size, Fixed extension/broswe catalogue filter buttons
This commit is contained in:
parent
743893f8c2
commit
dea8e18eda
@ -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(
|
||||
|
@ -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<IFlexible<*>>) {
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true" android:color="?attr/colorAccent">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="?attr/colorAccent" />
|
||||
<padding android:left="8dp" android:right="8dp" />
|
||||
</shape>
|
||||
<item android:state_activated="true">
|
||||
</item>
|
||||
<item android:state_enabled="false" android:color="@color/textColorHint">
|
||||
<shape android:shape="rectangle">
|
||||
|
@ -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"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -44,10 +44,14 @@
|
||||
android:background="?android:attr/divider"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/search_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:padding="8dp">
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:paddingBottom="20dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/reset_btn"
|
||||
@ -62,6 +66,7 @@
|
||||
style="@style/Theme.Widget.Button.Colored"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/action_search"/>
|
||||
|
||||
|
@ -72,9 +72,8 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:backgroundTint="@drawable/button_bg_transparent"
|
||||
android:textColor="@drawable/button_text_state"
|
||||
style="@style/Widget.MaterialComponents.Button"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -83,6 +83,7 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/ext_uninstall"
|
||||
style="@style/Theme.Widget.Button.Colored"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/listPreferredItemHeightSmall"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
@ -11,14 +11,14 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/nav_view_item_wrapper"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/nav_view_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionDone"
|
||||
|
Loading…
Reference in New Issue
Block a user