mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-26 19:08:25 +01:00
Workaround cleanup (#6350)
* Remove material-components workaround that was fixed upstream * Remove unused toolbar workaround * Fix cover dialog navigation icon
This commit is contained in:
parent
aeff846e1f
commit
38d131be37
@ -1,93 +0,0 @@
|
||||
package com.google.android.material.appbar
|
||||
|
||||
import android.animation.ValueAnimator
|
||||
import android.view.View
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.marginTop
|
||||
import eu.kanade.tachiyomi.util.system.animatorDurationScale
|
||||
import eu.kanade.tachiyomi.util.view.findChild
|
||||
import kotlin.math.roundToLong
|
||||
|
||||
/**
|
||||
* Hide toolbar on scroll behavior for [AppBarLayout].
|
||||
*
|
||||
* Inside this package to access some package-private methods.
|
||||
*/
|
||||
class HideToolbarOnScrollBehavior : AppBarLayout.Behavior() {
|
||||
|
||||
@ViewCompat.NestedScrollType
|
||||
private var lastStartedType: Int = 0
|
||||
|
||||
private var offsetAnimator: ValueAnimator? = null
|
||||
|
||||
private var toolbarHeight: Int = 0
|
||||
|
||||
override fun onStartNestedScroll(
|
||||
parent: CoordinatorLayout,
|
||||
child: AppBarLayout,
|
||||
directTargetChild: View,
|
||||
target: View,
|
||||
nestedScrollAxes: Int,
|
||||
type: Int
|
||||
): Boolean {
|
||||
lastStartedType = type
|
||||
offsetAnimator?.cancel()
|
||||
return super.onStartNestedScroll(parent, child, directTargetChild, target, nestedScrollAxes, type)
|
||||
}
|
||||
|
||||
override fun onStopNestedScroll(
|
||||
parent: CoordinatorLayout,
|
||||
layout: AppBarLayout,
|
||||
target: View,
|
||||
type: Int
|
||||
) {
|
||||
super.onStopNestedScroll(parent, layout, target, type)
|
||||
if (toolbarHeight == 0) {
|
||||
toolbarHeight = layout.findChild<Toolbar>()?.height ?: 0
|
||||
}
|
||||
if (lastStartedType == ViewCompat.TYPE_TOUCH || type == ViewCompat.TYPE_NON_TOUCH) {
|
||||
animateToolbarVisibility(
|
||||
parent,
|
||||
layout,
|
||||
getTopBottomOffsetForScrollingSibling(layout) > -toolbarHeight / 2
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFlingFinished(parent: CoordinatorLayout, layout: AppBarLayout) {
|
||||
super.onFlingFinished(parent, layout)
|
||||
animateToolbarVisibility(
|
||||
parent,
|
||||
layout,
|
||||
getTopBottomOffsetForScrollingSibling(layout) > -toolbarHeight / 2
|
||||
)
|
||||
}
|
||||
|
||||
private fun getTopBottomOffsetForScrollingSibling(abl: AppBarLayout): Int {
|
||||
return topBottomOffsetForScrollingSibling - abl.marginTop
|
||||
}
|
||||
|
||||
private fun animateToolbarVisibility(
|
||||
coordinatorLayout: CoordinatorLayout,
|
||||
child: AppBarLayout,
|
||||
isVisible: Boolean
|
||||
) {
|
||||
val current = getTopBottomOffsetForScrollingSibling(child)
|
||||
val target = if (isVisible) 0 else -toolbarHeight
|
||||
if (current == target) return
|
||||
|
||||
offsetAnimator?.cancel()
|
||||
offsetAnimator = ValueAnimator().apply {
|
||||
interpolator = DecelerateInterpolator()
|
||||
duration = (150 * child.context.animatorDurationScale).roundToLong()
|
||||
addUpdateListener {
|
||||
setHeaderTopBottomOffset(coordinatorLayout, child, it.animatedValue as Int)
|
||||
}
|
||||
setIntValues(current, target)
|
||||
start()
|
||||
}
|
||||
}
|
||||
}
|
@ -7,12 +7,10 @@ import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.FloatRange
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.lifecycle.coroutineScope
|
||||
import androidx.lifecycle.findViewTreeLifecycleOwner
|
||||
import com.google.android.material.animation.AnimationUtils
|
||||
import com.google.android.material.shape.MaterialShapeDrawable
|
||||
import com.google.android.material.shape.getStateAlpha
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.view.findChild
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
@ -53,7 +51,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor(
|
||||
private val offsetListener = OnOffsetChangedListener { appBarLayout, verticalOffset ->
|
||||
// Show status bar foreground when offset
|
||||
val foreground = (appBarLayout?.statusBarForeground as? MaterialShapeDrawable) ?: return@OnOffsetChangedListener
|
||||
val start = foreground.getStateAlpha()
|
||||
val start = foreground.alpha
|
||||
val end = if (verticalOffset != 0) 255 else 0
|
||||
|
||||
statusBarForegroundAnimator?.cancel()
|
||||
@ -81,8 +79,6 @@ class TachiyomiAppBarLayout @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getBehavior(): CoordinatorLayout.Behavior<AppBarLayout> = HideToolbarOnScrollBehavior()
|
||||
|
||||
/**
|
||||
* Disabled. Lift on scroll is handled manually with [eu.kanade.tachiyomi.widget.TachiyomiCoordinatorLayout]
|
||||
*/
|
||||
@ -154,7 +150,7 @@ class TachiyomiAppBarLayout @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
val transparent = if (lifted) false else isTransparentWhenNotLifted
|
||||
val fromAlpha = (background as? MaterialShapeDrawable)?.getStateAlpha() ?: background.alpha
|
||||
val fromAlpha = (background as? MaterialShapeDrawable)?.alpha ?: background.alpha
|
||||
val toAlpha = if (transparent) 0 else 255
|
||||
if (fromAlpha != toAlpha) {
|
||||
ValueAnimator.ofInt(fromAlpha, toAlpha).apply {
|
||||
|
@ -1,10 +0,0 @@
|
||||
package com.google.android.material.shape
|
||||
|
||||
/**
|
||||
* Use this instead of [MaterialShapeDrawable.getAlpha].
|
||||
*
|
||||
* https://github.com/material-components/material-components-android/issues/1796
|
||||
*/
|
||||
fun MaterialShapeDrawable.getStateAlpha(): Int {
|
||||
return (constantState as? MaterialShapeDrawable.MaterialShapeDrawableState)?.alpha ?: alpha
|
||||
}
|
@ -157,7 +157,7 @@ class WebViewActivity : BaseViewBindingActivity<WebviewActivityBinding>() {
|
||||
backItem?.isEnabled = binding.webview.canGoBack()
|
||||
forwardItem?.isEnabled = binding.webview.canGoForward()
|
||||
|
||||
val iconTintColor = getResourceColor(R.attr.colorOnToolbar)
|
||||
val iconTintColor = getResourceColor(R.attr.colorOnSurface)
|
||||
val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127)
|
||||
backItem?.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor)
|
||||
forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 34% of 12% = ~4% -->
|
||||
<item android:alpha="0.34" android:color="?attr/rippleColorToolbar" />
|
||||
<item android:alpha="0.34" android:color="?attr/colorControlHighlight" />
|
||||
</selector>
|
||||
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Based on mtrl_tabs_icon_color_selector_colored.
|
||||
|
||||
We want to use the accent color in some themes, but sometimes colorPrimary doesn't work well with
|
||||
it (i.e. blue themes).
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimary" android:state_selected="true" />
|
||||
<item android:alpha="0.60" android:color="?attr/colorOnToolbar" />
|
||||
</selector>
|
@ -20,8 +20,6 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorToolbar"
|
||||
android:elevation="2dp"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
|
@ -24,7 +24,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
|
@ -12,7 +12,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorToolbar"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="2dp"
|
||||
android:padding="32dp">
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
android:layout_height="56dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_tachi"
|
||||
app:tint="?attr/colorOnToolbar"
|
||||
app:tint="?attr/colorOnSurface"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</FrameLayout>
|
||||
|
@ -30,7 +30,6 @@
|
||||
android:id="@+id/top_nav"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="?attr/colorToolbar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -44,7 +43,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/top_nav"
|
||||
app:layout_constraintStart_toStartOf="@+id/top_nav"
|
||||
app:layout_constraintTop_toTopOf="@+id/top_nav"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cover_container"
|
||||
@ -85,7 +84,6 @@
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="?attr/colorToolbar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
@ -81,7 +81,7 @@
|
||||
android:contentDescription="@string/action_previous_chapter"
|
||||
android:padding="@dimen/screen_edge_margin"
|
||||
app:srcCompat="@drawable/ic_skip_previous_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reader_seekbar"
|
||||
@ -98,7 +98,7 @@
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
android:textColor="?attr/colorOnSurface"
|
||||
android:textSize="15sp"
|
||||
tools:text="1" />
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textColor="?attr/colorOnToolbar"
|
||||
android:textColor="?attr/colorOnSurface"
|
||||
android:textSize="15sp"
|
||||
tools:text="15" />
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
android:contentDescription="@string/action_next_chapter"
|
||||
android:padding="@dimen/screen_edge_margin"
|
||||
app:srcCompat="@drawable/ic_skip_next_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_reader_default_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_crop_borders"
|
||||
@ -169,7 +169,7 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/action_reading_mode"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_crop_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_rotation"
|
||||
@ -182,7 +182,7 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/action_crop_borders"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_screen_rotation_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_settings"
|
||||
@ -195,7 +195,7 @@
|
||||
app:layout_constraintStart_toEndOf="@id/action_rotation"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_settings_24dp"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnSurface" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@drawable/ic_translate_24dp"
|
||||
android:title="@string/action_filter"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:id="@+id/action_sort"
|
||||
android:icon="@drawable/ic_sort_24dp"
|
||||
android:title="@string/action_sort"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" >
|
||||
<menu>
|
||||
<item
|
||||
@ -41,7 +41,7 @@
|
||||
android:id="@+id/action_source_migration_help"
|
||||
android:icon="@drawable/ic_help_24dp"
|
||||
android:title="@string/migration_help_guide"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:icon="@drawable/ic_travel_explore_24dp"
|
||||
android:title="@string/action_global_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@drawable/ic_filter_list_24dp"
|
||||
android:title="@string/action_filter"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:id="@+id/action_edit"
|
||||
android:icon="@drawable/ic_edit_24dp"
|
||||
android:title="@string/action_edit"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:id="@+id/action_download"
|
||||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
android:id="@+id/action_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||
android:title="@string/action_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
android:id="@+id/action_remove_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_24dp"
|
||||
android:title="@string/action_remove_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
android:id="@+id/action_mark_previous_as_read"
|
||||
android:icon="@drawable/ic_done_prev_24dp"
|
||||
android:title="@string/action_mark_previous_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:id="@+id/action_history"
|
||||
android:icon="@drawable/ic_history_24dp"
|
||||
android:title="@string/whats_new"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
|
@ -6,19 +6,19 @@
|
||||
android:id="@+id/action_share_cover"
|
||||
android:icon="@drawable/ic_share_24dp"
|
||||
android:title="@string/action_share"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_save_cover"
|
||||
android:icon="@drawable/ic_save_24dp"
|
||||
android:title="@string/action_save"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_edit_cover"
|
||||
android:icon="@drawable/ic_edit_24dp"
|
||||
android:title="@string/action_edit"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:id="@+id/action_select_all"
|
||||
android:icon="@drawable/ic_select_all_24dp"
|
||||
android:title="@string/action_select_all"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_select_inverse"
|
||||
android:icon="@drawable/ic_flip_to_back_24dp"
|
||||
android:title="@string/action_select_inverse"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -7,14 +7,14 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom|collapseActionView" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_clear_history"
|
||||
android:icon="@drawable/ic_delete_sweep_24dp"
|
||||
android:title="@string/pref_clear_history"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -8,21 +8,21 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_filter"
|
||||
android:icon="@drawable/ic_filter_list_24dp"
|
||||
android:title="@string/action_filter"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_update_library"
|
||||
android:icon="@drawable/ic_refresh_24dp"
|
||||
android:title="@string/action_update_library"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:id="@+id/action_move_to_category"
|
||||
android:icon="@drawable/ic_label_24dp"
|
||||
android:title="@string/action_move_category"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
android:id="@+id/action_download_unread"
|
||||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:id="@+id/action_share"
|
||||
android:icon="@drawable/ic_share_24dp"
|
||||
android:title="@string/action_share"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/download_group"
|
||||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/manga_download"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom">
|
||||
<menu>
|
||||
<item
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:id="@+id/action_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||
android:title="@string/action_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_remove_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_24dp"
|
||||
android:title="@string/action_remove_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:id="@+id/action_tracking_help"
|
||||
android:icon="@drawable/ic_help_24dp"
|
||||
android:title="@string/tracking_guide"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -6,13 +6,13 @@
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="eu.kanade.tachiyomi.widget.TachiyomiSearchView"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
<item
|
||||
android:icon="@drawable/ic_view_module_24dp"
|
||||
android:title="@string/action_display_mode"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom">
|
||||
<menu>
|
||||
<group android:checkableBehavior="single">
|
||||
@ -33,14 +33,14 @@
|
||||
android:id="@+id/action_open_in_web_view"
|
||||
android:icon="@drawable/ic_public_24dp"
|
||||
android:title="@string/action_open_in_web_view"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_local_source_help"
|
||||
android:icon="@drawable/ic_help_24dp"
|
||||
android:title="@string/local_source_help_guide"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:id="@+id/action_update_library"
|
||||
android:icon="@drawable/ic_refresh_24dp"
|
||||
android:title="@string/action_update_library"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
@ -7,7 +7,7 @@
|
||||
android:id="@+id/action_download"
|
||||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
android:id="@+id/action_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||
android:title="@string/action_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
android:id="@+id/action_remove_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_24dp"
|
||||
android:title="@string/action_remove_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="always"
|
||||
tools:ignore="AlwaysShowAction" />
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
android:id="@+id/action_web_back"
|
||||
android:icon="@drawable/ic_arrow_back_24dp"
|
||||
android:title="@string/action_webview_back"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_web_forward"
|
||||
android:icon="@drawable/ic_arrow_forward_24dp"
|
||||
android:title="@string/action_webview_forward"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:iconTint="?attr/colorOnSurface"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
|
@ -13,19 +13,6 @@
|
||||
</declare-styleable>
|
||||
|
||||
<attr name="colorFilterActive" format="reference|integer"/>
|
||||
<attr name="colorTertiary" format="reference|integer"/>
|
||||
<attr name="colorOnTertiary" format="reference|integer"/>
|
||||
|
||||
<!-- Ripple color for toolbar elements -->
|
||||
<attr name="rippleColorToolbar" format="reference|color"/>
|
||||
|
||||
<!-- Toolbar color. Not actually used by the toolbar. -->
|
||||
<attr name="colorToolbar" format="reference|color"/>
|
||||
|
||||
<!-- For anything that is drawn on the toolbar -->
|
||||
<attr name="colorOnToolbar" format="reference|integer"/>
|
||||
|
||||
<attr name="lightSystemBarsOnPrimary" format="reference|boolean"/>
|
||||
|
||||
<!-- Setting chip color values for specific themes -->
|
||||
<attr name="chipTextColor" format="reference|integer"/>
|
||||
|
@ -5,21 +5,12 @@
|
||||
<!--Toolbars-->
|
||||
<!--========-->
|
||||
|
||||
<style name="ThemeOverlay.Tachiyomi.ActionBar" parent="ThemeOverlay.Material3.ActionBar">
|
||||
<item name="android:colorControlHighlight">?attr/rippleColorToolbar</item>
|
||||
<item name="android:tint">?attr/colorOnToolbar</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Tachiyomi.ActionMode" parent="Widget.Material3.ActionMode">
|
||||
<item name="background">?attr/colorToolbar</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Tachiyomi.ActionMode.CloseButton" parent="Widget.AppCompat.ActionButton.CloseMode">
|
||||
<item name="android:tint">?attr/colorOnToolbar</item>
|
||||
<item name="android:tint">?attr/colorOnSurface</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Tachiyomi.ActionButton.Overflow" parent="Widget.AppCompat.ActionButton.Overflow">
|
||||
<item name="android:tint">?attr/colorOnToolbar</item>
|
||||
<item name="android:tint">?attr/colorOnSurface</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
@ -38,14 +38,11 @@
|
||||
<item name="colorErrorContainer">@color/errorContainer</item>
|
||||
<item name="colorOnErrorContainer">@color/onErrorContainer</item>
|
||||
|
||||
<item name="colorToolbar">?attr/colorSurface</item>
|
||||
<item name="colorOnToolbar">?attr/colorOnSurface</item>
|
||||
<item name="android:divider">@color/divider_default</item>
|
||||
<item name="android:listDivider">@drawable/line_divider</item>
|
||||
|
||||
<!-- Ripples -->
|
||||
<item name="colorControlHighlight">?attr/colorSurfaceVariant</item>
|
||||
<item name="rippleColorToolbar">?attr/colorControlHighlight</item>
|
||||
|
||||
<!-- Handles RTL Text -->
|
||||
<item name="android:textAlignment">gravity</item>
|
||||
@ -65,11 +62,9 @@
|
||||
<item name="android:buttonStyle">?attr/borderlessButtonStyle</item>
|
||||
<item name="android:backgroundDimAmount">0.32</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
<item name="actionModeStyle">@style/Widget.Tachiyomi.ActionMode</item>
|
||||
<item name="actionOverflowButtonStyle">@style/Theme.Tachiyomi.ActionButton.Overflow</item>
|
||||
<item name="actionModeCloseButtonStyle">@style/Theme.Tachiyomi.ActionMode.CloseButton</item>
|
||||
<item name="actionModeCloseDrawable">@drawable/ic_close_24dp</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.Tachiyomi.ActionBar</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Tachiyomi</item>
|
||||
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.Tachiyomi.BottomSheetDialog</item>
|
||||
<item name="chipStyle">@style/Widget.Tachiyomi.Chip.Action</item>
|
||||
@ -84,7 +79,6 @@
|
||||
<item name="switchStyle">@style/Widget.Tachiyomi.Switch</item>
|
||||
<item name="sliderStyle">@style/Widget.Tachiyomi.Slider</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="lightSystemBarsOnPrimary">false</item>
|
||||
|
||||
<!-- Custom Attributes-->
|
||||
<item name="colorFilterActive">@color/filter_light</item>
|
||||
@ -125,7 +119,6 @@
|
||||
<item name="colorOnSurfaceInverse">@color/greenapple_inverseOnSurface</item>
|
||||
<item name="colorSurfaceInverse">@color/greenapple_inverseSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/greenapple_primaryInverse</item>
|
||||
<item name="lightSystemBarsOnPrimary">true</item>
|
||||
</style>
|
||||
|
||||
<!--== Midnight Dusk Theme ==-->
|
||||
|
Loading…
Reference in New Issue
Block a user