More work on the white + md2
This commit is contained in:
parent
f24fefad59
commit
a1d0d113b9
@ -30,6 +30,7 @@
|
|||||||
android:networkSecurityConfig="@xml/network_security_config">
|
android:networkSecurityConfig="@xml/network_security_config">
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.main.MainActivity"
|
android:name=".ui.main.MainActivity"
|
||||||
|
android:windowSoftInputMode="adjustPan"
|
||||||
android:theme="@style/Theme.Splash">
|
android:theme="@style/Theme.Splash">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package eu.kanade.tachiyomi.ui.extension
|
package eu.kanade.tachiyomi.ui.extension
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.graphics.Color
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat
|
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat
|
||||||
@ -60,8 +62,8 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
|||||||
isClickable = true
|
isClickable = true
|
||||||
isActivated = false
|
isActivated = false
|
||||||
|
|
||||||
background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null)
|
//background = VectorDrawableCompat.create(resources!!, R.drawable.button_bg_transparent, null)
|
||||||
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_transparent))
|
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_text_state))
|
||||||
|
|
||||||
val extension = item.extension
|
val extension = item.extension
|
||||||
|
|
||||||
@ -82,11 +84,14 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
|||||||
when {
|
when {
|
||||||
extension.hasUpdate -> {
|
extension.hasUpdate -> {
|
||||||
isActivated = true
|
isActivated = true
|
||||||
|
// backgroundTintList = ColorStateList(arrayOf(intArrayOf(0)), intArrayOf(Color
|
||||||
|
//.BLACK))
|
||||||
setText(R.string.ext_update)
|
setText(R.string.ext_update)
|
||||||
}
|
}
|
||||||
extension.isObsolete -> {
|
extension.isObsolete -> {
|
||||||
// Red outline
|
// Red outline
|
||||||
background = VectorDrawableCompat.create(resources, R.drawable.button_bg_error, null)
|
// background = VectorDrawableCompat.create(resources, R.drawable
|
||||||
|
// .button_bg_error, null)
|
||||||
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
|
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
|
||||||
|
|
||||||
setText(R.string.ext_obsolete)
|
setText(R.string.ext_obsolete)
|
||||||
|
@ -446,6 +446,9 @@ class LibraryController(
|
|||||||
searchView.clearFocus()
|
searchView.clearFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Mutate the filter icon because it needs to be tinted and the resource is shared.
|
||||||
|
menu.findItem(R.id.action_filter).icon.mutate()
|
||||||
|
|
||||||
searchViewSubscription?.unsubscribe()
|
searchViewSubscription?.unsubscribe()
|
||||||
searchViewSubscription = searchView.queryTextChanges()
|
searchViewSubscription = searchView.queryTextChanges()
|
||||||
// Ignore events if this controller isn't at the top
|
// Ignore events if this controller isn't at the top
|
||||||
@ -468,10 +471,9 @@ class LibraryController(
|
|||||||
val filterItem = menu.findItem(R.id.action_filter)
|
val filterItem = menu.findItem(R.id.action_filter)
|
||||||
|
|
||||||
// Tint icon if there's a filter active
|
// Tint icon if there's a filter active
|
||||||
if (navView.hasActiveFilters())
|
val filterColor = if (navView.hasActiveFilters()) Color.rgb(255, 238, 7)
|
||||||
DrawableCompat.setTint(filterItem.icon, Color.rgb(255, 238, 7))
|
else activity?.getResourceColor(R.attr.actionBarTintColor) ?: Color.WHITE
|
||||||
else
|
DrawableCompat.setTint(filterItem.icon, filterColor)
|
||||||
DrawableCompat.clearColorFilter(filterItem.icon)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
|
@ -39,7 +39,7 @@ class SearchActivity: MainActivity() {
|
|||||||
setSupportActionBar(sToolbar)
|
setSupportActionBar(sToolbar)
|
||||||
|
|
||||||
drawerArrow = DrawerArrowDrawable(this)
|
drawerArrow = DrawerArrowDrawable(this)
|
||||||
drawerArrow?.color = Color.WHITE
|
drawerArrow?.color = getResourceColor(R.attr.actionBarTintColor)
|
||||||
sToolbar.navigationIcon = drawerArrow
|
sToolbar.navigationIcon = drawerArrow
|
||||||
|
|
||||||
tabAnimator = TabsAnimator(sTabs)
|
tabAnimator = TabsAnimator(sTabs)
|
||||||
@ -87,9 +87,15 @@ class SearchActivity: MainActivity() {
|
|||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
val currentNightMode = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||||
if (Build.VERSION.SDK_INT >= 26 && currentNightMode == Configuration.UI_MODE_NIGHT_NO) {
|
if (Build.VERSION.SDK_INT >= 26 && currentNightMode == Configuration.UI_MODE_NIGHT_NO &&
|
||||||
content.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
preferences.theme() >= 8) {
|
||||||
|
content.systemUiVisibility = content.systemUiVisibility.or(View
|
||||||
|
.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR)
|
||||||
}
|
}
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && currentNightMode == Configuration
|
||||||
|
.UI_MODE_NIGHT_NO && preferences.theme() >= 8)
|
||||||
|
content.systemUiVisibility = content.systemUiVisibility.or(View
|
||||||
|
.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)
|
||||||
|
|
||||||
val drawerContainer: FrameLayout = findViewById(R.id.search_container)
|
val drawerContainer: FrameLayout = findViewById(R.id.search_container)
|
||||||
drawerContainer.setOnApplyWindowInsetsListener { v, insets ->
|
drawerContainer.setOnApplyWindowInsetsListener { v, insets ->
|
||||||
|
@ -32,6 +32,7 @@ import eu.kanade.tachiyomi.util.system.await
|
|||||||
import eu.kanade.tachiyomi.util.system.launchUI
|
import eu.kanade.tachiyomi.util.system.launchUI
|
||||||
import eu.kanade.tachiyomi.util.chapter.syncChaptersWithSource
|
import eu.kanade.tachiyomi.util.chapter.syncChaptersWithSource
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import kotlinx.android.synthetic.main.chapters_controller.*
|
import kotlinx.android.synthetic.main.chapters_controller.*
|
||||||
import kotlinx.coroutines.CancellationException
|
import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@ -400,9 +401,13 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
|||||||
resources!!, R.drawable.ic_done_white_24dp, null
|
resources!!, R.drawable.ic_done_white_24dp, null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val translucentWhite = ColorUtils.setAlphaComponent(Color.WHITE, 127)
|
|
||||||
menuCopy.icon?.setTint(if (allMangasDone) Color.WHITE else translucentWhite)
|
menuCopy.icon.mutate()
|
||||||
menuMigrate?.icon?.setTint(if (allMangasDone) Color.WHITE else translucentWhite)
|
menuMigrate.icon.mutate()
|
||||||
|
val tintColor = activity?.getResourceColor(R.attr.actionBarTintColor) ?: Color.WHITE
|
||||||
|
val translucentWhite = ColorUtils.setAlphaComponent(tintColor, 127)
|
||||||
|
menuCopy.icon?.setTint(if (allMangasDone) tintColor else translucentWhite)
|
||||||
|
menuMigrate?.icon?.setTint(if (allMangasDone) tintColor else translucentWhite)
|
||||||
menuCopy.isEnabled = allMangasDone
|
menuCopy.isEnabled = allMangasDone
|
||||||
menuMigrate.isEnabled = allMangasDone
|
menuMigrate.isEnabled = allMangasDone
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.afollestad.materialdialogs.list.listItems
|
|||||||
import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
import com.afollestad.materialdialogs.list.listItemsSingleChoice
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
|
import eu.kanade.tachiyomi.widget.preference.ExtensionPreference
|
||||||
import eu.kanade.tachiyomi.widget.preference.IntListMatPreference
|
import eu.kanade.tachiyomi.widget.preference.IntListMatPreference
|
||||||
import eu.kanade.tachiyomi.widget.preference.IntListPreference
|
import eu.kanade.tachiyomi.widget.preference.IntListPreference
|
||||||
import eu.kanade.tachiyomi.widget.preference.ListMatPreference
|
import eu.kanade.tachiyomi.widget.preference.ListMatPreference
|
||||||
@ -29,6 +30,10 @@ inline fun PreferenceGroup.preference(block: (@DSL Preference).() -> Unit): Pref
|
|||||||
return initThenAdd(Preference(context), block)
|
return initThenAdd(Preference(context), block)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun PreferenceGroup.extensionPreference(block: (@DSL Preference).() -> Unit): ExtensionPreference {
|
||||||
|
return initThenAdd(ExtensionPreference(context), block)
|
||||||
|
}
|
||||||
|
|
||||||
inline fun PreferenceGroup.switchPreference(block: (@DSL SwitchPreferenceCompat).() -> Unit): SwitchPreferenceCompat {
|
inline fun PreferenceGroup.switchPreference(block: (@DSL SwitchPreferenceCompat).() -> Unit): SwitchPreferenceCompat {
|
||||||
return initThenAdd(SwitchPreferenceCompat(context), block)
|
return initThenAdd(SwitchPreferenceCompat(context), block)
|
||||||
}
|
}
|
||||||
|
@ -18,20 +18,11 @@ class SettingsMainController : SettingsController() {
|
|||||||
titleRes = R.string.label_settings
|
titleRes = R.string.label_settings
|
||||||
|
|
||||||
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
||||||
val preferencesH: PreferencesHelper by injectLazy()
|
|
||||||
|
|
||||||
val updateCount = preferencesH.extensionUpdatesCount().getOrDefault()
|
extensionPreference {
|
||||||
preference {
|
|
||||||
iconRes = R.drawable.ic_extension_black_24dp
|
iconRes = R.drawable.ic_extension_black_24dp
|
||||||
iconTint = tintColor
|
iconTint = tintColor
|
||||||
if (updateCount == 0) {
|
|
||||||
titleRes = R.string.label_extensions
|
titleRes = R.string.label_extensions
|
||||||
}
|
|
||||||
else {
|
|
||||||
title = "${resources?.getString(R.string.label_extensions)} ${resources
|
|
||||||
?.getQuantityString(R.plurals.extensions_updates_pendings, updateCount,
|
|
||||||
updateCount)}"
|
|
||||||
}
|
|
||||||
onClick { navigateTo(ExtensionController()) }
|
onClick { navigateTo(ExtensionController()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ class WebViewActivity : BaseActivity() {
|
|||||||
toolbar.setNavigationOnClickListener {
|
toolbar.setNavigationOnClickListener {
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
}
|
||||||
|
toolbar.navigationIcon?.setTint(getResourceColor(R.attr.actionBarTintColor))
|
||||||
|
|
||||||
val container:ViewGroup = findViewById(R.id.web_view_layout)
|
val container:ViewGroup = findViewById(R.id.web_view_layout)
|
||||||
val content: LinearLayout = findViewById(R.id.web_linear_layout)
|
val content: LinearLayout = findViewById(R.id.web_linear_layout)
|
||||||
@ -192,26 +193,34 @@ class WebViewActivity : BaseActivity() {
|
|||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
|
val currentNightMode = newConfig.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||||
|
val lightMode = currentNightMode == Configuration.UI_MODE_NIGHT_NO
|
||||||
window.statusBarColor = getResourceColor(R.attr.colorPrimary)
|
window.statusBarColor = getResourceColor(R.attr.colorPrimary)
|
||||||
toolbar.setBackgroundColor(getResourceColor(R.attr.colorPrimary))
|
toolbar.setBackgroundColor(getResourceColor(R.attr.colorPrimary))
|
||||||
|
toolbar.popupTheme = if (lightMode) R.style.ThemeOverlay_MaterialComponents else R
|
||||||
|
.style.ThemeOverlay_MaterialComponents_Dark
|
||||||
|
val tintColor = getResourceColor(R.attr.actionBarTintColor)
|
||||||
|
toolbar.navigationIcon?.setTint(tintColor)
|
||||||
|
toolbar.overflowIcon?.mutate()
|
||||||
|
toolbar.setTitleTextColor(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(android.R.attr.colorPrimary)
|
||||||
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)
|
||||||
|
|
||||||
val currentNightMode = newConfig.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
|
||||||
if (Build.VERSION.SDK_INT >= 26) {
|
|
||||||
if (currentNightMode == Configuration.UI_MODE_NIGHT_NO) {
|
|
||||||
web_linear_layout.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
|
||||||
} else {
|
|
||||||
web_linear_layout.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
|
web_linear_layout.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && lightMode) {
|
||||||
|
web_linear_layout.systemUiVisibility = web_linear_layout.systemUiVisibility.or(View
|
||||||
|
.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR)
|
||||||
}
|
}
|
||||||
}
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && lightMode && preferences.theme() >= 8)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && currentNightMode == Configuration
|
web_linear_layout.systemUiVisibility = web_linear_layout.systemUiVisibility
|
||||||
.UI_MODE_NIGHT_NO && preferences.theme() >= 8)
|
.or(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)
|
||||||
web_linear_layout.systemUiVisibility.or(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR)
|
invalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -230,9 +239,10 @@ class WebViewActivity : BaseActivity() {
|
|||||||
val hasHistory = webview.canGoBack() || webview.canGoForward()
|
val hasHistory = webview.canGoBack() || webview.canGoForward()
|
||||||
backItem?.isVisible = hasHistory
|
backItem?.isVisible = hasHistory
|
||||||
forwardItem?.isVisible = hasHistory
|
forwardItem?.isVisible = hasHistory
|
||||||
val translucentWhite = ColorUtils.setAlphaComponent(Color.WHITE, 127)
|
val tintColor = getResourceColor(R.attr.actionBarTintColor)
|
||||||
backItem.icon?.setTint(if (webview.canGoBack()) Color.WHITE else translucentWhite)
|
val translucentWhite = ColorUtils.setAlphaComponent(tintColor, 127)
|
||||||
forwardItem?.icon?.setTint(if (webview.canGoForward()) Color.WHITE else translucentWhite)
|
backItem.icon?.setTint(if (webview.canGoBack()) tintColor else translucentWhite)
|
||||||
|
forwardItem?.icon?.setTint(if (webview.canGoForward()) tintColor else translucentWhite)
|
||||||
return super.onPrepareOptionsMenu(menu)
|
return super.onPrepareOptionsMenu(menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,44 @@
|
|||||||
|
package eu.kanade.tachiyomi.widget.preference
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import androidx.preference.Preference
|
||||||
|
import androidx.preference.PreferenceViewHolder
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import eu.kanade.tachiyomi.R
|
||||||
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
|
import eu.kanade.tachiyomi.util.gone
|
||||||
|
import eu.kanade.tachiyomi.util.visible
|
||||||
|
import kotlinx.android.synthetic.main.preference_update_text.view.*
|
||||||
|
import uy.kohesive.injekt.Injekt
|
||||||
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
|
class ExtensionPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||||
|
Preference(context, attrs) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
widgetLayoutResource = R.layout.preference_update_text
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
|
super.onBindViewHolder(holder)
|
||||||
|
|
||||||
|
val extUpdateText = holder.itemView.textView
|
||||||
|
|
||||||
|
val updates = Injekt.get<PreferencesHelper>().extensionUpdatesCount().getOrDefault()
|
||||||
|
if (updates > 0) {
|
||||||
|
extUpdateText.text = context.resources.getQuantityString(R.plurals
|
||||||
|
.extensions_updates_available, updates, updates)
|
||||||
|
extUpdateText.visible()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
extUpdateText.text = null
|
||||||
|
extUpdateText.gone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override public fun notifyChanged() {
|
||||||
|
super.notifyChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_activated="true" android:color="@color/md_white_1000">
|
<item android:state_activated="true" android:color="?attr/colorAccent">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="2dp" />
|
<corners android:radius="2dp" />
|
||||||
<solid android:color="@color/colorAccent" />
|
<solid android:color="?attr/colorAccent" />
|
||||||
<padding android:left="8dp" android:right="8dp" />
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
@ -15,11 +15,11 @@
|
|||||||
<padding android:left="8dp" android:right="8dp" />
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:color="@color/colorAccent">
|
<item android:color="@color/button_bg">
|
||||||
<shape android:shape="rectangle" android:color="@color/colorAccent">
|
<shape android:shape="rectangle" android:color="@color/colorAccent">
|
||||||
<corners android:radius="2dp" />
|
<corners android:radius="2dp" />
|
||||||
<solid android:color="@android:color/transparent" />
|
<solid android:color="@android:color/transparent" />
|
||||||
<stroke android:color="@color/colorAccent" android:width="1dp"/>
|
<stroke android:color="?attr/colorAccent" android:width="1dp"/>
|
||||||
<padding android:left="8dp" android:right="8dp" />
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
26
app/src/main/res/drawable/button_text_state.xml
Normal file
26
app/src/main/res/drawable/button_text_state.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_activated="true" android:color="@color/md_white_1000">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="2dp" />
|
||||||
|
<solid android:color="?attr/colorAccent" />
|
||||||
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:state_enabled="false" android:color="@color/textColorHint">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="2dp" />
|
||||||
|
<solid android:color="@android:color/transparent" />
|
||||||
|
<stroke android:color="@color/textColorHint" android:width="1dp"/>
|
||||||
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:color="@color/colorAccent">
|
||||||
|
<shape android:shape="rectangle" android:color="@color/colorAccent">
|
||||||
|
<corners android:radius="2dp" />
|
||||||
|
<solid android:color="@android:color/transparent" />
|
||||||
|
<stroke android:color="?attr/colorAccent" android:width="1dp"/>
|
||||||
|
<padding android:left="8dp" android:right="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
@ -2,7 +2,8 @@
|
|||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0"
|
||||||
|
android:tint="?attr/actionBarTintColor">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FFFFFFFF"
|
||||||
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0"
|
||||||
|
android:tint="?attr/actionBarTintColor">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FFFFFFFF"
|
||||||
android:pathData="M16.59,8.59L12,13.17 7.41,8.59 6,10l6,6 6,-6z"/>
|
android:pathData="M16.59,8.59L12,13.17 7.41,8.59 6,10l6,6 6,-6z"/>
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0"
|
||||||
|
android:tint="?attr/actionBarTintColor">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FFFFFFFF"
|
||||||
android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
|
android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
android:width="24dp"
|
android:width="24dp"
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24.0"
|
android:viewportWidth="24.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0"
|
||||||
|
android:tint="?attr/actionBarTintColor">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FFFFFFFF"
|
||||||
android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
|
android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/>
|
||||||
|
5
app/src/main/res/drawable/ic_swap_calls_white_24dp.xml
Normal file
5
app/src/main/res/drawable/ic_swap_calls_white_24dp.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="?attr/actionBarTintColor"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M18,4l-4,4h3v7c0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2V8c0,-2.21 -1.79,-4 -4,-4S5,5.79 5,8v7H2l4,4 4,-4H7V8c0,-1.1 0.9,-2 2,-2s2,0.9 2,2v7c0,2.21 1.79,4 4,4s4,-1.79 4,-4V8h3l-4,-4z"/>
|
||||||
|
</vector>
|
@ -68,13 +68,13 @@
|
|||||||
<Button
|
<Button
|
||||||
android:id="@+id/ext_button"
|
android:id="@+id/ext_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="32dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:foreground="?attr/selectableItemBackground"
|
android:backgroundTint="@drawable/button_bg_transparent"
|
||||||
android:background="@drawable/button_bg_transparent"
|
android:textColor="@drawable/button_text_state"
|
||||||
android:textColor="@drawable/button_bg_transparent"
|
style="@style/Widget.MaterialComponents.Button"
|
||||||
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"
|
||||||
|
15
app/src/main/res/layout/preference_update_text.xml
Normal file
15
app/src/main/res/layout/preference_update_text.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
|
||||||
|
android:background="@drawable/round_textview_background"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:paddingStart="10dp"
|
||||||
|
android:paddingEnd="10dp"/>
|
@ -30,11 +30,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="@style/Theme.ActionBar.Tab"
|
android:theme="@style/Theme.ActionBar.Tab"
|
||||||
app:tabIndicatorColor="?attr/actionBarTintColor"
|
android:background="?colorPrimary"
|
||||||
app:tabTextColor="?attr/actionBarTintColor"
|
app:tabRippleColor="@color/rippleColor"
|
||||||
|
app:tabIndicatorColor="?attr/tabBarIconColor"
|
||||||
|
app:tabTextColor="?attr/tabBarIconColor"
|
||||||
app:tabInlineLabel="true"
|
app:tabInlineLabel="true"
|
||||||
app:tabGravity="center"
|
app:tabGravity="center"
|
||||||
app:tabMode="scrollable"
|
app:tabMode="auto"
|
||||||
app:tabMinWidth="75dp"/>
|
app:tabMinWidth="75dp"/>
|
||||||
|
|
||||||
</eu.kanade.tachiyomi.widget.ElevationAppBarLayout>
|
</eu.kanade.tachiyomi.widget.ElevationAppBarLayout>
|
||||||
|
@ -29,4 +29,5 @@
|
|||||||
|
|
||||||
<color name="selectorColor">@color/md_blue_A200_50</color>
|
<color name="selectorColor">@color/md_blue_A200_50</color>
|
||||||
<color name="iconColor">@color/md_white_1000_54</color>
|
<color name="iconColor">@color/md_white_1000_54</color>
|
||||||
|
<color name="button_bg">@color/md_grey_800</color>
|
||||||
</resources>
|
</resources>
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents.Dark</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
@ -2,7 +2,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- Application Colors -->
|
<!-- Application Colors -->
|
||||||
<color name="colorPrimary">#54759E</color>
|
<color name="colorPrimary">#54759E</color>
|
||||||
<color name="colorPrimaryInactive">#C254759E</color>
|
<color name="colorPrimaryInactive">#C2424242</color>
|
||||||
<color name="drawerColor">#54759E</color>
|
<color name="drawerColor">#54759E</color>
|
||||||
<color name="colorPrimaryDark">#54759E</color>
|
<color name="colorPrimaryDark">#54759E</color>
|
||||||
<color name="purePrimary">@color/md_white_1000</color>
|
<color name="purePrimary">@color/md_white_1000</color>
|
||||||
@ -21,8 +21,8 @@
|
|||||||
<color name="dialog_amoled">@color/darkPrimaryColor</color>
|
<color name="dialog_amoled">@color/darkPrimaryColor</color>
|
||||||
<color name="readerPrimary">#212121</color>
|
<color name="readerPrimary">#212121</color>
|
||||||
<color name="readerDarkBackground">#1C1C1D</color>
|
<color name="readerDarkBackground">#1C1C1D</color>
|
||||||
|
<color name="button_bg">@color/md_white_1000</color>
|
||||||
|
|
||||||
<!-- Light Theme -->
|
|
||||||
<color name="textColorPrimary">@color/md_black_1000_87</color>
|
<color name="textColorPrimary">@color/md_black_1000_87</color>
|
||||||
<color name="textColorSecondary">@color/md_black_1000_54</color>
|
<color name="textColorSecondary">@color/md_black_1000_54</color>
|
||||||
<color name="textColorPrimaryInverse">@color/md_white_1000</color>
|
<color name="textColorPrimaryInverse">@color/md_white_1000</color>
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
<string name="label_selected">Selected: %1$d</string>
|
<string name="label_selected">Selected: %1$d</string>
|
||||||
<string name="label_migration">Source migration</string>
|
<string name="label_migration">Source migration</string>
|
||||||
<string name="label_extensions">Extensions</string>
|
<string name="label_extensions">Extensions</string>
|
||||||
<plurals name="extensions_updates_pendings">
|
<plurals name="extensions_updates_available">
|
||||||
<item quantity="one">(1 update pending)</item>
|
<item quantity="one">Update available</item>
|
||||||
<item quantity="other">(%d updates pending)</item>
|
<item quantity="other">%d updates available</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="label_extension_info">Extension info</string>
|
<string name="label_extension_info">Extension info</string>
|
||||||
<string name="label_help">Help</string>
|
<string name="label_help">Help</string>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<!--========-->
|
<!--========-->
|
||||||
|
|
||||||
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
<style name="Theme.ActionBar.DayNight" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
<item name="popupTheme">@style/ThemeOverlay.MaterialComponents.Light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!--====-->
|
<!--====-->
|
||||||
@ -196,9 +196,11 @@
|
|||||||
<!--==============-->
|
<!--==============-->
|
||||||
<style name="Theme.Widget.Button" parent="Widget.AppCompat.Button"/>
|
<style name="Theme.Widget.Button" parent="Widget.AppCompat.Button"/>
|
||||||
|
|
||||||
<style name="Theme.Widget.Button.Colored" parent="Widget.AppCompat.Button.Colored"/>
|
<style name="Theme.Widget.Button.Colored" parent="Widget.MaterialComponents.Button">
|
||||||
|
<item name="backgroundTint">?attr/colorAccent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Widget.Button.Borderless" parent="Widget.AppCompat.Button.Borderless">
|
<style name="Theme.Widget.Button.Borderless" parent="Widget.MaterialComponents.Button.TextButton">
|
||||||
<item name="android:textColor">?attr/colorAccent</item>
|
<item name="android:textColor">?attr/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<item name="android:forceDarkAllowed">false</item>
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorOnPrimary">@color/md_white_1000</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</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>
|
||||||
@ -60,6 +61,7 @@
|
|||||||
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
|
<style name="Theme.Tachiyomi.MatWhite" parent="Theme.Tachiyomi">
|
||||||
<item name="colorPrimary">@color/purePrimary</item>
|
<item name="colorPrimary">@color/purePrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/purePrimary</item>
|
<item name="colorPrimaryDark">@color/purePrimary</item>
|
||||||
|
<item name="colorOnPrimary">@color/colorPrimary</item>
|
||||||
<item name="actionBarTintColor">@color/textColorPrimary</item>
|
<item name="actionBarTintColor">@color/textColorPrimary</item>
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
|
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.DayNight.ActionBar</item>
|
||||||
<item name="tabBarIconColor">@color/colorPrimary</item>
|
<item name="tabBarIconColor">@color/colorPrimary</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user