mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-12 21:35:18 +01:00
Theme refactoring again
This commit is contained in:
parent
6ee80d2a2b
commit
776c85a954
@ -19,7 +19,7 @@ import eu.kanade.tachiyomi.util.view.setEdgeToEdge
|
|||||||
import kotlinx.android.synthetic.main.catalogue_drawer_content.*
|
import kotlinx.android.synthetic.main.catalogue_drawer_content.*
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
|
||||||
class CatalogueSearchSheet(private val activity: Activity) :
|
class CatalogueSearchSheet(activity: Activity) :
|
||||||
BottomSheetDialog(activity, R.style.BottomSheetDialogThemeCovered) {
|
BottomSheetDialog(activity, R.style.BottomSheetDialogThemeCovered) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,6 @@ import eu.davidea.flexibleadapter.FlexibleAdapter
|
|||||||
import eu.davidea.flexibleadapter.items.AbstractHeaderItem
|
import eu.davidea.flexibleadapter.items.AbstractHeaderItem
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.davidea.viewholders.FlexibleViewHolder
|
import eu.davidea.viewholders.FlexibleViewHolder
|
||||||
import eu.kanade.tachiyomi.R
|
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
|
|
||||||
@ -26,7 +25,7 @@ class HeaderItem(val filter: Filter.Header) : AbstractHeaderItem<HeaderItem.Hold
|
|||||||
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, holder: Holder, position: Int, payloads: MutableList<Any?>?) {
|
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>, holder: Holder, position: Int, payloads: MutableList<Any?>?) {
|
||||||
val view = holder.itemView as TextView
|
val view = holder.itemView as TextView
|
||||||
view.text = filter.name
|
view.text = filter.name
|
||||||
view.setTextColor(view.context.getResourceColor(R.attr.actionBarTintColor))
|
view.setTextColor(view.context.getResourceColor(android.R.attr.textColorPrimary))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
@ -211,12 +211,12 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
|||||||
}
|
}
|
||||||
// if in landscape with 2/3 button mode, fully opaque nav bar
|
// if in landscape with 2/3 button mode, fully opaque nav bar
|
||||||
else if (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0) {
|
else if (v.rootWindowInsets.systemWindowInsetLeft > 0 || v.rootWindowInsets.systemWindowInsetRight > 0) {
|
||||||
getResourceColor(android.R.attr.colorPrimary)
|
getResourceColor(R.attr.colorPrimaryVariant)
|
||||||
}
|
}
|
||||||
// if in portrait with 2/3 button mode, translucent nav bar
|
// if in portrait with 2/3 button mode, translucent nav bar
|
||||||
else {
|
else {
|
||||||
ColorUtils.setAlphaComponent(
|
ColorUtils.setAlphaComponent(
|
||||||
getResourceColor(android.R.attr.colorPrimary), 179
|
getResourceColor(R.attr.colorPrimaryVariant), 179
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val contextView = window?.decorView?.findViewById<View>(R.id.action_mode_bar)
|
val contextView = window?.decorView?.findViewById<View>(R.id.action_mode_bar)
|
||||||
@ -316,7 +316,7 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun startSupportActionMode(callback: androidx.appcompat.view.ActionMode.Callback): androidx.appcompat.view.ActionMode? {
|
override fun startSupportActionMode(callback: androidx.appcompat.view.ActionMode.Callback): androidx.appcompat.view.ActionMode? {
|
||||||
window?.statusBarColor = getResourceColor(R.attr.colorPrimary)
|
window?.statusBarColor = getResourceColor(R.attr.colorPrimaryVariant)
|
||||||
return super.startSupportActionMode(callback)
|
return super.startSupportActionMode(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ class MangaDetailsController : BaseController,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val color =
|
val color =
|
||||||
coverColor ?: activity!!.getResourceColor(android.R.attr.colorPrimary)
|
coverColor ?: activity!!.getResourceColor(R.attr.colorPrimaryVariant)
|
||||||
val colorFrom =
|
val colorFrom =
|
||||||
if (colorAnimator?.isRunning == true) activity?.window?.statusBarColor
|
if (colorAnimator?.isRunning == true) activity?.window?.statusBarColor
|
||||||
?: color
|
?: color
|
||||||
@ -360,14 +360,14 @@ class MangaDetailsController : BaseController,
|
|||||||
}
|
}
|
||||||
colorAnimator?.cancel()
|
colorAnimator?.cancel()
|
||||||
|
|
||||||
val colorOnPrimary = activity?.getResourceColor(
|
val colorSecondary = activity?.getResourceColor(
|
||||||
R.attr.colorOnPrimary
|
R.attr.colorSecondary
|
||||||
) ?: Color.BLACK
|
) ?: Color.BLACK
|
||||||
(activity as MainActivity).appbar.setBackgroundColor(colorOnPrimary)
|
(activity as MainActivity).appbar.setBackgroundColor(colorSecondary)
|
||||||
(activity as MainActivity).toolbar.setBackgroundColor(colorOnPrimary)
|
(activity as MainActivity).toolbar.setBackgroundColor(colorSecondary)
|
||||||
|
|
||||||
activity?.window?.statusBarColor = activity?.getResourceColor(android.R.attr
|
activity?.window?.statusBarColor = activity?.getResourceColor(android.R.attr
|
||||||
.statusBarColor) ?: colorOnPrimary
|
.statusBarColor) ?: colorSecondary
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,22 +517,22 @@ class MangaDetailsController : BaseController,
|
|||||||
|
|
||||||
fun toggleReadChapter(position: Int) {
|
fun toggleReadChapter(position: Int) {
|
||||||
val item = adapter?.getItem(position) as? ChapterItem ?: return
|
val item = adapter?.getItem(position) as? ChapterItem ?: return
|
||||||
if (!item.read) markAsRead(listOf(item), false)
|
if (!item.read) markAsRead(listOf(item))
|
||||||
else markAsUnread(listOf(item), false)
|
else markAsUnread(listOf(item))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bookmarkChapters(chapters: List<ChapterItem>, bookmarked: Boolean) {
|
private fun bookmarkChapters(chapters: List<ChapterItem>, bookmarked: Boolean) {
|
||||||
presenter.bookmarkChapters(chapters, bookmarked)
|
presenter.bookmarkChapters(chapters, bookmarked)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun markAsRead(chapters: List<ChapterItem>, refresh: Boolean = true) {
|
private fun markAsRead(chapters: List<ChapterItem>) {
|
||||||
presenter.markChaptersRead(chapters, read = true)
|
presenter.markChaptersRead(chapters, read = true)
|
||||||
if (presenter.preferences.removeAfterMarkedAsRead()) {
|
if (presenter.preferences.removeAfterMarkedAsRead()) {
|
||||||
presenter.deleteChapters(chapters)
|
presenter.deleteChapters(chapters)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun markAsUnread(chapters: List<ChapterItem>, refresh: Boolean = true) {
|
private fun markAsUnread(chapters: List<ChapterItem>) {
|
||||||
presenter.markChaptersRead(chapters, read = false)
|
presenter.markChaptersRead(chapters, read = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1248,25 +1248,25 @@ class MangaDetailsController : BaseController,
|
|||||||
expandedImageView.setOnClickListener {
|
expandedImageView.setOnClickListener {
|
||||||
currentAnimator?.cancel()
|
currentAnimator?.cancel()
|
||||||
|
|
||||||
val rect = Rect()
|
val rect2 = Rect()
|
||||||
thumbView.getGlobalVisibleRect(rect)
|
thumbView.getGlobalVisibleRect(rect2)
|
||||||
expandedImageView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
expandedImageView.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||||
height = thumbView.height
|
height = thumbView.height
|
||||||
width = thumbView.width
|
width = thumbView.width
|
||||||
topMargin = rect.top
|
topMargin = rect2.top
|
||||||
leftMargin = rect.left
|
leftMargin = rect2.left
|
||||||
rightMargin = rect.right
|
rightMargin = rect2.right
|
||||||
bottomMargin = rect.bottom
|
bottomMargin = rect2.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zoom out back to tc thumbnail
|
// Zoom out back to tc thumbnail
|
||||||
val transitionSet = TransitionSet()
|
val transitionSet2 = TransitionSet()
|
||||||
val bound = ChangeBounds()
|
val bound2 = ChangeBounds()
|
||||||
transitionSet.addTransition(bound)
|
transitionSet2.addTransition(bound2)
|
||||||
val changeImageTransform = ChangeImageTransform()
|
val changeImageTransform2 = ChangeImageTransform()
|
||||||
transitionSet.addTransition(changeImageTransform)
|
transitionSet2.addTransition(changeImageTransform2)
|
||||||
transitionSet.duration = shortAnimationDuration.toLong()
|
transitionSet2.duration = shortAnimationDuration.toLong()
|
||||||
TransitionManager.beginDelayedTransition(frame_layout, transitionSet)
|
TransitionManager.beginDelayedTransition(frame_layout, transitionSet2)
|
||||||
|
|
||||||
// Animation to remove backdrop and hide the full cover
|
// Animation to remove backdrop and hide the full cover
|
||||||
currentAnimator = AnimatorSet().apply {
|
currentAnimator = AnimatorSet().apply {
|
||||||
|
@ -42,7 +42,7 @@ class SettingsTrackingController : SettingsController(),
|
|||||||
trackPreference(trackManager.aniList) {
|
trackPreference(trackManager.aniList) {
|
||||||
onClick {
|
onClick {
|
||||||
val tabsIntent = CustomTabsIntent.Builder()
|
val tabsIntent = CustomTabsIntent.Builder()
|
||||||
.setToolbarColor(context.getResourceColor(R.attr.colorPrimary))
|
.setToolbarColor(context.getResourceColor(R.attr.colorPrimaryVariant))
|
||||||
.build()
|
.build()
|
||||||
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
||||||
tabsIntent.launchUrl(activity!!, AnilistApi.authUrl())
|
tabsIntent.launchUrl(activity!!, AnilistApi.authUrl())
|
||||||
@ -58,7 +58,7 @@ class SettingsTrackingController : SettingsController(),
|
|||||||
trackPreference(trackManager.shikimori) {
|
trackPreference(trackManager.shikimori) {
|
||||||
onClick {
|
onClick {
|
||||||
val tabsIntent = CustomTabsIntent.Builder()
|
val tabsIntent = CustomTabsIntent.Builder()
|
||||||
.setToolbarColor(context.getResourceColor(R.attr.colorPrimary))
|
.setToolbarColor(context.getResourceColor(R.attr.colorPrimaryVariant))
|
||||||
.build()
|
.build()
|
||||||
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
||||||
tabsIntent.launchUrl(activity!!, ShikimoriApi.authUrl())
|
tabsIntent.launchUrl(activity!!, ShikimoriApi.authUrl())
|
||||||
@ -67,7 +67,7 @@ class SettingsTrackingController : SettingsController(),
|
|||||||
trackPreference(trackManager.bangumi) {
|
trackPreference(trackManager.bangumi) {
|
||||||
onClick {
|
onClick {
|
||||||
val tabsIntent = CustomTabsIntent.Builder()
|
val tabsIntent = CustomTabsIntent.Builder()
|
||||||
.setToolbarColor(context.getResourceColor(R.attr.colorPrimary))
|
.setToolbarColor(context.getResourceColor(R.attr.colorPrimaryVariant))
|
||||||
.build()
|
.build()
|
||||||
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
tabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
|
||||||
tabsIntent.launchUrl(activity!!, BangumiApi.authUrl())
|
tabsIntent.launchUrl(activity!!, BangumiApi.authUrl())
|
||||||
|
@ -96,7 +96,7 @@ class WebViewActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.statusBarColor = ColorUtils.setAlphaComponent(getResourceColor(R.attr
|
window.statusBarColor = ColorUtils.setAlphaComponent(getResourceColor(R.attr
|
||||||
.colorOnPrimary), 255)
|
.colorSecondary), 255)
|
||||||
|
|
||||||
content.setOnApplyWindowInsetsListener { v, insets ->
|
content.setOnApplyWindowInsetsListener { v, insets ->
|
||||||
// if pure white theme on a device that does not support dark status bar
|
// if pure white theme on a device that does not support dark status bar
|
||||||
@ -104,7 +104,7 @@ class WebViewActivity : BaseActivity() {
|
|||||||
window.statusBarColor = Color.BLACK
|
window.statusBarColor = Color.BLACK
|
||||||
else window.statusBarColor = getResourceColor(R.attr.colorPrimary)*/
|
else window.statusBarColor = getResourceColor(R.attr.colorPrimary)*/
|
||||||
window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||||
val colorPrimary = getResourceColor(android.R.attr.colorPrimary)
|
val colorPrimary = getResourceColor(R.attr.colorPrimaryVariant)
|
||||||
if (colorPrimary == Color.WHITE) Color.BLACK
|
if (colorPrimary == Color.WHITE) Color.BLACK
|
||||||
else getResourceColor(android.R.attr.colorPrimary)
|
else getResourceColor(android.R.attr.colorPrimary)
|
||||||
}
|
}
|
||||||
@ -191,8 +191,8 @@ class WebViewActivity : BaseActivity() {
|
|||||||
val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||||
val lightMode = currentNightMode == Configuration.UI_MODE_NIGHT_NO
|
val lightMode = currentNightMode == Configuration.UI_MODE_NIGHT_NO
|
||||||
window.statusBarColor = ColorUtils.setAlphaComponent(getResourceColor(R.attr
|
window.statusBarColor = ColorUtils.setAlphaComponent(getResourceColor(R.attr
|
||||||
.colorOnPrimary), 255)
|
.colorSecondary), 255)
|
||||||
toolbar.setBackgroundColor(getResourceColor(R.attr.colorOnPrimary))
|
toolbar.setBackgroundColor(getResourceColor(R.attr.colorSecondary))
|
||||||
toolbar.popupTheme = if (lightMode) R.style.ThemeOverlay_MaterialComponents else R
|
toolbar.popupTheme = if (lightMode) R.style.ThemeOverlay_MaterialComponents else R
|
||||||
.style.ThemeOverlay_MaterialComponents_Dark
|
.style.ThemeOverlay_MaterialComponents_Dark
|
||||||
val tintColor = getResourceColor(R.attr.actionBarTintColor)
|
val tintColor = getResourceColor(R.attr.actionBarTintColor)
|
||||||
@ -202,7 +202,7 @@ class WebViewActivity : BaseActivity() {
|
|||||||
toolbar.overflowIcon?.setTint(tintColor)
|
toolbar.overflowIcon?.setTint(tintColor)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
|
||||||
window.navigationBarColor = getResourceColor(android.R.attr.colorPrimary)
|
window.navigationBarColor = getResourceColor(R.attr.colorPrimaryVariant)
|
||||||
else if (window.navigationBarColor != getColor(android.R.color.transparent))
|
else if (window.navigationBarColor != getColor(android.R.color.transparent))
|
||||||
window.navigationBarColor = getResourceColor(android.R.attr.colorBackground)
|
window.navigationBarColor = getResourceColor(android.R.attr.colorBackground)
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ fun Context.openInBrowser(url: String) {
|
|||||||
try {
|
try {
|
||||||
val parsedUrl = Uri.parse(url)
|
val parsedUrl = Uri.parse(url)
|
||||||
val intent = CustomTabsIntent.Builder()
|
val intent = CustomTabsIntent.Builder()
|
||||||
.setToolbarColor(getResourceColor(R.attr.colorPrimary))
|
.setToolbarColor(getResourceColor(R.attr.colorPrimaryVariant))
|
||||||
.build()
|
.build()
|
||||||
intent.launchUrl(this, parsedUrl)
|
intent.launchUrl(this, parsedUrl)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
11
app/src/main/res/color/text_input_stroke.xml
Normal file
11
app/src/main/res/color/text_input_stroke.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
The regular version uses ?attr/colorPrimary when focused, which doesn't work well with our themes.
|
||||||
|
https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/textfield/res/color/mtrl_filled_stroke_color.xml
|
||||||
|
-->
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:color="?attr/colorAccent" android:state_focused="true" />
|
||||||
|
<item android:alpha="0.87" android:color="?android:attr/textColorPrimary" android:state_hovered="true" />
|
||||||
|
<item android:alpha="0.12" android:color="?android:attr/textColorPrimary" android:state_enabled="false" />
|
||||||
|
<item android:alpha="0.38" android:color="?android:attr/textColorPrimary" />
|
||||||
|
</selector>
|
@ -2,7 +2,7 @@
|
|||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:bottom="5dp">
|
<item android:bottom="5dp">
|
||||||
<shape>
|
<shape>
|
||||||
<solid android:color="?attr/colorPrimary"/>
|
<solid android:color="?attr/colorPrimaryVariant"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:height="5dp" android:gravity="bottom">
|
<item android:height="5dp" android:gravity="bottom">
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_bottom_sheet_primary"
|
android:background="@drawable/bg_bottom_sheet_primary"
|
||||||
|
android:backgroundTint="?android:attr/colorBackground"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
@ -21,6 +22,7 @@
|
|||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
android:background="@drawable/bg_bottom_sheet_primary"
|
android:background="@drawable/bg_bottom_sheet_primary"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
@ -30,6 +32,7 @@
|
|||||||
android:id="@+id/reset_btn"
|
android:id="@+id/reset_btn"
|
||||||
style="@style/Theme.Widget.Button.TextButton"
|
style="@style/Theme.Widget.Button.TextButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:textColor="?attr/tabBarIconColor"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="@string/action_reset"
|
android:text="@string/action_reset"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -60,7 +63,7 @@
|
|||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:src="@drawable/ic_expand_more_white_24dp"
|
android:src="@drawable/ic_expand_more_white_24dp"
|
||||||
android:tint="?android:attr/textColorPrimary"
|
android:tint="?attr/actionBarTintColor"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
android:background="@drawable/bg_bottom_sheet_dialog_fragment"
|
||||||
android:backgroundTint="?android:attr/colorPrimary"
|
android:backgroundTint="?attr/colorPrimaryVariant"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="?attr/actionBarTheme"
|
android:theme="?attr/actionBarTheme"
|
||||||
android:background="?attr/colorOnPrimary"
|
android:background="?attr/colorSecondary"
|
||||||
android:stateListAnimator="@null"
|
android:stateListAnimator="@null"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorOnPrimary">
|
android:background="?attr/colorSecondary">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/title_layout"
|
android:id="@+id/title_layout"
|
||||||
@ -44,8 +44,7 @@
|
|||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
tools:background="?colorPrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/toolbar_title"
|
android:id="@+id/toolbar_title"
|
||||||
@ -92,7 +91,7 @@
|
|||||||
android:id="@+id/bottom_nav"
|
android:id="@+id/bottom_nav"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?colorPrimaryVariant"
|
||||||
app:itemIconTint="@drawable/bottom_nav_item_selector"
|
app:itemIconTint="@drawable/bottom_nav_item_selector"
|
||||||
app:itemRippleColor="@color/rippleColor"
|
app:itemRippleColor="@color/rippleColor"
|
||||||
app:itemTextColor="@drawable/bottom_nav_item_selector"
|
app:itemTextColor="@drawable/bottom_nav_item_selector"
|
||||||
@ -101,7 +100,6 @@
|
|||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:menu="@menu/bottom_navigation"
|
app:menu="@menu/bottom_navigation"
|
||||||
app:tabBackground="@color/rippleColor"
|
|
||||||
app:tabRippleColor="@color/rippleColor"
|
app:tabRippleColor="@color/rippleColor"
|
||||||
app:tabTextColor="?attr/tabBarIconColor" />
|
app:tabTextColor="?attr/tabBarIconColor" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/listPreferredItemHeightSmall"
|
android:layout_height="?attr/listPreferredItemHeightSmall"
|
||||||
android:background="?colorPrimary"
|
android:background="?colorPrimaryVariant"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
|
||||||
android:paddingEnd="?attr/listPreferredItemPaddingEnd"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:focusable="true">
|
android:focusable="true"
|
||||||
|
android:paddingStart="?attr/listPreferredItemPaddingStart"
|
||||||
|
android:paddingEnd="?attr/listPreferredItemPaddingEnd">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/nav_view_item_wrapper"
|
android:id="@+id/nav_view_item_wrapper"
|
||||||
|
style="@style/Theme.Widget.TextInputLayout.OutlinedBox.Dense"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@ -19,9 +19,9 @@
|
|||||||
android:id="@+id/nav_view_item"
|
android:id="@+id/nav_view_item"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
|
||||||
android:inputType="text"
|
|
||||||
android:imeOptions="actionDone"
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="text"
|
||||||
|
android:maxLines="1"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorOnPrimary"
|
android:background="?attr/colorSecondary"
|
||||||
android:theme="?attr/actionBarTheme"
|
android:theme="?attr/actionBarTheme"
|
||||||
app:navigationIcon="@drawable/ic_close_white_24dp"
|
app:navigationIcon="@drawable/ic_close_white_24dp"
|
||||||
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
<style name="Theme.Tachiyomi" parent="Theme.Base">
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
|
<item name="android:windowLightNavigationBar" tools:targetApi="27">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Base.Reader" parent="Theme.Base">
|
<style name="Theme.Base.Reader" parent="Theme.Base">
|
||||||
@ -19,6 +20,8 @@
|
|||||||
<!--==============-->
|
<!--==============-->
|
||||||
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi">
|
<style name="Theme.Tachiyomi.Amoled" parent="Theme.Tachiyomi">
|
||||||
<item name="colorPrimary">@color/colorAmoledPrimary</item>
|
<item name="colorPrimary">@color/colorAmoledPrimary</item>
|
||||||
|
<item name="colorSecondary">@color/colorAmoledPrimary</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/colorAmoledPrimary</item>
|
||||||
<item name="colorOnPrimary">@color/colorAmoledPrimary</item>
|
<item name="colorOnPrimary">@color/colorAmoledPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorAmoledPrimary</item>
|
<item name="colorPrimaryDark">@color/colorAmoledPrimary</item>
|
||||||
<item name="android:colorBackground">@color/md_black_1000</item>
|
<item name="android:colorBackground">@color/md_black_1000</item>
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
<string name="action_filter_tracked">Tracked</string>
|
<string name="action_filter_tracked">Tracked</string>
|
||||||
<string name="action_filter_not_tracked">Not tracked</string>
|
<string name="action_filter_not_tracked">Not tracked</string>
|
||||||
<string name="action_hide_categories">Hide categories</string>
|
<string name="action_hide_categories">Hide categories</string>
|
||||||
<string name="action_start_filters_hidden">Hide filters on startup</string>
|
<string name="action_start_filters_hidden">Start hidden</string>
|
||||||
<string name="hiding_categories">Hiding categories</string>
|
<string name="hiding_categories">Hiding categories</string>
|
||||||
<string name="manga_only">Manga only</string>
|
<string name="manga_only">Manga only</string>
|
||||||
<string name="manhwa_only">Manhwa only</string>
|
<string name="manhwa_only">Manhwa only</string>
|
||||||
|
@ -220,6 +220,12 @@
|
|||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Widget.TextInputLayout.OutlinedBox.Dense" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
|
||||||
|
<item name="boxStrokeColor">@color/text_input_stroke</item>
|
||||||
|
<item name="hintTextColor">?colorAccent</item>
|
||||||
|
<item name="android:textColorHint">?android:attr/textColorHint</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!--==============-->
|
<!--==============-->
|
||||||
<!--Widgets.Button-->
|
<!--Widgets.Button-->
|
||||||
<!--==============-->
|
<!--==============-->
|
||||||
|
@ -9,9 +9,11 @@
|
|||||||
<style name="Theme.Base" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Theme.Base" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<item name="android:forceDarkAllowed" tools:targetApi="29">false</item>
|
<item name="android:forceDarkAllowed" tools:targetApi="29">false</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/bluePrimary</item>
|
||||||
<item name="colorOnPrimary">@color/background</item>
|
<item name="colorPrimaryVariant">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorSecondary">@color/background</item>
|
||||||
|
<item name="colorPrimaryDark">@color/bluePrimary</item>
|
||||||
|
<item name="colorControlActivated">@color/colorAccent</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="android:textColorPrimary">@color/textColorPrimary</item>
|
<item name="android:textColorPrimary">@color/textColorPrimary</item>
|
||||||
<item name="android:textColorSecondary">@color/textColorSecondary</item>
|
<item name="android:textColorSecondary">@color/textColorSecondary</item>
|
||||||
@ -64,9 +66,8 @@
|
|||||||
|
|
||||||
<style name="Theme.Tachiyomi" parent="Theme.Base"/>
|
<style name="Theme.Tachiyomi" parent="Theme.Base"/>
|
||||||
<style name="Theme.Tachiyomi.AllBlue" parent="Theme.Tachiyomi">
|
<style name="Theme.Tachiyomi.AllBlue" parent="Theme.Tachiyomi">
|
||||||
<item name="colorPrimary">@color/bluePrimary</item>
|
<item name="colorPrimaryVariant">@color/bluePrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/bluePrimary</item>
|
<item name="colorSecondary">@color/bluePrimary</item>
|
||||||
<item name="colorOnPrimary">@color/bluePrimary</item>
|
|
||||||
<item name="tabBarIconColor">@color/md_white_1000</item>
|
<item name="tabBarIconColor">@color/md_white_1000</item>
|
||||||
<item name="tabBarIconInactive">@color/md_white_1000_50</item>
|
<item name="tabBarIconInactive">@color/md_white_1000_50</item>
|
||||||
<item name="android:statusBarColor">@color/blueStatus</item>
|
<item name="android:statusBarColor">@color/blueStatus</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user