Update dependencies
This commit is contained in:
@@ -19,8 +19,8 @@ android {
|
|||||||
applicationId 'org.koitharu.kotatsu'
|
applicationId 'org.koitharu.kotatsu'
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1004
|
versionCode = 1005
|
||||||
versionName = '8.0'
|
versionName = '8.1'
|
||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner'
|
testInstrumentationRunner 'org.koitharu.kotatsu.HiltTestRunner'
|
||||||
ksp {
|
ksp {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.koitharu.kotatsu.parsers.model.MangaParserSource
|
|||||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
import org.koitharu.kotatsu.parsers.util.splitTwoParts
|
import org.koitharu.kotatsu.parsers.util.splitTwoParts
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
data object LocalMangaSource : MangaSource {
|
data object LocalMangaSource : MangaSource {
|
||||||
override val name = "LOCAL"
|
override val name = "LOCAL"
|
||||||
@@ -103,7 +103,7 @@ fun MangaSource.getTitle(context: Context): String = when (val source = unwrap()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun SpannableStringBuilder.appendNsfwLabel(context: Context) = inSpans(
|
fun SpannableStringBuilder.appendNsfwLabel(context: Context) = inSpans(
|
||||||
ForegroundColorSpan(context.getThemeColor(materialR.attr.colorError, Color.RED)),
|
ForegroundColorSpan(context.getThemeColor(appcompatR.attr.colorError, Color.RED)),
|
||||||
RelativeSizeSpan(0.74f),
|
RelativeSizeSpan(0.74f),
|
||||||
SuperscriptSpan(),
|
SuperscriptSpan(),
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ import org.koitharu.kotatsu.stats.ui.sheet.MangaStatsSheet
|
|||||||
import org.koitharu.kotatsu.suggestions.ui.SuggestionsActivity
|
import org.koitharu.kotatsu.suggestions.ui.SuggestionsActivity
|
||||||
import org.koitharu.kotatsu.tracker.ui.updates.UpdatesActivity
|
import org.koitharu.kotatsu.tracker.ui.updates.UpdatesActivity
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
class AppRouter private constructor(
|
class AppRouter private constructor(
|
||||||
private val activity: FragmentActivity?,
|
private val activity: FragmentActivity?,
|
||||||
@@ -414,7 +414,7 @@ class AppRouter private constructor(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
buildAlertDialog(contextOrNull() ?: return) {
|
buildAlertDialog(contextOrNull() ?: return) {
|
||||||
setIcon(context.getThemeDrawable(materialR.attr.actionModeShareDrawable))
|
setIcon(context.getThemeDrawable(appcompatR.attr.actionModeShareDrawable))
|
||||||
setTitle(R.string.share)
|
setTitle(R.string.share)
|
||||||
setItems(
|
setItems(
|
||||||
arrayOf(
|
arrayOf(
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ abstract class BaseActivity<B : ViewBinding> :
|
|||||||
supportActionBar?.run {
|
supportActionBar?.run {
|
||||||
setDisplayHomeAsUpEnabled(isEnabled)
|
setDisplayHomeAsUpEnabled(isEnabled)
|
||||||
if (showUpAsClose) {
|
if (showUpAsClose) {
|
||||||
setHomeAsUpIndicator(materialR.drawable.abc_ic_clear_material)
|
setHomeAsUpIndicator(materialR.drawable.ic_clear_black_24)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
|||||||
import org.koitharu.kotatsu.core.util.ext.isLayoutReversed
|
import org.koitharu.kotatsu.core.util.ext.isLayoutReversed
|
||||||
import org.koitharu.kotatsu.databinding.FastScrollerBinding
|
import org.koitharu.kotatsu.databinding.FastScrollerBinding
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
private const val SCROLLBAR_HIDE_DELAY = 1000L
|
private const val SCROLLBAR_HIDE_DELAY = 1000L
|
||||||
@@ -132,7 +133,7 @@ class FastScroller @JvmOverloads constructor(
|
|||||||
clipChildren = false
|
clipChildren = false
|
||||||
orientation = HORIZONTAL
|
orientation = HORIZONTAL
|
||||||
|
|
||||||
@ColorInt var bubbleColor = context.getThemeColor(materialR.attr.colorControlNormal, Color.DKGRAY)
|
@ColorInt var bubbleColor = context.getThemeColor(appcompatR.attr.colorControlNormal, Color.DKGRAY)
|
||||||
@ColorInt var handleColor = bubbleColor
|
@ColorInt var handleColor = bubbleColor
|
||||||
@ColorInt var trackColor = context.getThemeColor(materialR.attr.colorOutline, Color.LTGRAY)
|
@ColorInt var trackColor = context.getThemeColor(materialR.attr.colorOutline, Color.LTGRAY)
|
||||||
@ColorInt var textColor = context.getThemeColor(android.R.attr.textColorPrimaryInverse, Color.WHITE)
|
@ColorInt var textColor = context.getThemeColor(android.R.attr.textColorPrimaryInverse, Color.WHITE)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import org.koitharu.kotatsu.core.ui.image.AnimatedPlaceholderDrawable
|
|||||||
import org.koitharu.kotatsu.core.util.progress.ImageRequestIndicatorListener
|
import org.koitharu.kotatsu.core.util.progress.ImageRequestIndicatorListener
|
||||||
import org.koitharu.kotatsu.parsers.model.Manga
|
import org.koitharu.kotatsu.parsers.model.Manga
|
||||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
fun ImageView.newImageRequest(lifecycleOwner: LifecycleOwner, data: Any?): ImageRequest.Builder? {
|
fun ImageView.newImageRequest(lifecycleOwner: LifecycleOwner, data: Any?): ImageRequest.Builder? {
|
||||||
@@ -112,7 +113,7 @@ fun ImageRequest.Builder.bookmarkExtra(bookmark: Bookmark): ImageRequest.Builder
|
|||||||
fun ImageRequest.Builder.defaultPlaceholders(context: Context): ImageRequest.Builder {
|
fun ImageRequest.Builder.defaultPlaceholders(context: Context): ImageRequest.Builder {
|
||||||
val errorColor = ColorUtils.blendARGB(
|
val errorColor = ColorUtils.blendARGB(
|
||||||
context.getThemeColor(materialR.attr.colorErrorContainer),
|
context.getThemeColor(materialR.attr.colorErrorContainer),
|
||||||
context.getThemeColor(materialR.attr.colorBackgroundFloating),
|
context.getThemeColor(appcompatR.attr.colorBackgroundFloating),
|
||||||
0.25f,
|
0.25f,
|
||||||
)
|
)
|
||||||
return placeholder(AnimatedPlaceholderDrawable(context))
|
return placeholder(AnimatedPlaceholderDrawable(context))
|
||||||
|
|||||||
@@ -15,16 +15,17 @@ import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
|||||||
import org.koitharu.kotatsu.core.util.ext.getItem
|
import org.koitharu.kotatsu.core.util.ext.getItem
|
||||||
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
||||||
import org.koitharu.kotatsu.details.ui.model.ChapterListItem
|
import org.koitharu.kotatsu.details.ui.model.ChapterListItem
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class ChaptersSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
class ChaptersSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
||||||
|
|
||||||
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||||
private val radius = context.resources.getDimension(materialR.dimen.abc_control_corner_material)
|
private val radius = context.resources.getDimension(appcompatR.dimen.abc_control_corner_material)
|
||||||
private val checkIcon = ContextCompat.getDrawable(context, materialR.drawable.ic_mtrl_checked_circle)
|
private val checkIcon = ContextCompat.getDrawable(context, materialR.drawable.ic_mtrl_checked_circle)
|
||||||
private val iconOffset = context.resources.getDimensionPixelOffset(R.dimen.chapter_check_offset)
|
private val iconOffset = context.resources.getDimensionPixelOffset(R.dimen.chapter_check_offset)
|
||||||
private val iconSize = context.resources.getDimensionPixelOffset(R.dimen.chapter_check_size)
|
private val iconSize = context.resources.getDimensionPixelOffset(R.dimen.chapter_check_size)
|
||||||
private val strokeColor = context.getThemeColor(materialR.attr.colorPrimary, Color.RED)
|
private val strokeColor = context.getThemeColor(appcompatR.attr.colorPrimary, Color.RED)
|
||||||
private val fillColor = ColorUtils.setAlphaComponent(
|
private val fillColor = ColorUtils.setAlphaComponent(
|
||||||
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
||||||
0x74,
|
0x74,
|
||||||
@@ -32,7 +33,7 @@ class ChaptersSelectionDecoration(context: Context) : AbstractSelectionItemDecor
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
paint.color = ColorUtils.setAlphaComponent(
|
paint.color = ColorUtils.setAlphaComponent(
|
||||||
context.getThemeColor(materialR.attr.colorPrimary, Color.DKGRAY),
|
context.getThemeColor(appcompatR.attr.colorPrimary, Color.DKGRAY),
|
||||||
98,
|
98,
|
||||||
)
|
)
|
||||||
paint.style = Paint.Style.FILL
|
paint.style = Paint.Style.FILL
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import org.koitharu.kotatsu.list.ui.model.ListModel
|
|||||||
import org.koitharu.kotatsu.parsers.model.Manga
|
import org.koitharu.kotatsu.parsers.model.Manga
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
data class DownloadItemModel(
|
data class DownloadItemModel(
|
||||||
val id: UUID,
|
val id: UUID,
|
||||||
@@ -62,7 +62,7 @@ data class DownloadItemModel(
|
|||||||
fun getErrorMessage(context: Context): CharSequence? = if (error != null) {
|
fun getErrorMessage(context: Context): CharSequence? = if (error != null) {
|
||||||
buildSpannedString {
|
buildSpannedString {
|
||||||
bold {
|
bold {
|
||||||
color(context.getThemeColor(materialR.attr.colorError, Color.RED)) {
|
color(context.getThemeColor(appcompatR.attr.colorError, Color.RED)) {
|
||||||
append(error)
|
append(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ data class DownloadItemModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun compareTo(other: DownloadItemModel): Int {
|
override fun compareTo(other: DownloadItemModel): Int {
|
||||||
return timestamp.compareTo(other.timestamp)
|
return timestamp compareTo other.timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun areItemsTheSame(other: ListModel): Boolean {
|
override fun areItemsTheSame(other: ListModel): Boolean {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.koitharu.kotatsu.R
|
|||||||
import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
||||||
import org.koitharu.kotatsu.core.util.ext.getItem
|
import org.koitharu.kotatsu.core.util.ext.getItem
|
||||||
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class DownloadsSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
class DownloadsSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
||||||
@@ -23,7 +24,7 @@ class DownloadsSelectionDecoration(context: Context) : AbstractSelectionItemDeco
|
|||||||
private val checkIcon = ContextCompat.getDrawable(context, materialR.drawable.ic_mtrl_checked_circle)
|
private val checkIcon = ContextCompat.getDrawable(context, materialR.drawable.ic_mtrl_checked_circle)
|
||||||
private val iconOffset = context.resources.getDimensionPixelOffset(R.dimen.card_indicator_offset)
|
private val iconOffset = context.resources.getDimensionPixelOffset(R.dimen.card_indicator_offset)
|
||||||
private val iconSize = context.resources.getDimensionPixelOffset(R.dimen.card_indicator_size)
|
private val iconSize = context.resources.getDimensionPixelOffset(R.dimen.card_indicator_size)
|
||||||
private val strokeColor = context.getThemeColor(materialR.attr.colorPrimary, Color.RED)
|
private val strokeColor = context.getThemeColor(appcompatR.attr.colorPrimary, Color.RED)
|
||||||
private val fillColor = ColorUtils.setAlphaComponent(
|
private val fillColor = ColorUtils.setAlphaComponent(
|
||||||
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
||||||
0x74,
|
0x74,
|
||||||
|
|||||||
@@ -14,12 +14,13 @@ import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
|||||||
import org.koitharu.kotatsu.core.util.ext.getItem
|
import org.koitharu.kotatsu.core.util.ext.getItem
|
||||||
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
||||||
import org.koitharu.kotatsu.explore.ui.model.MangaSourceItem
|
import org.koitharu.kotatsu.explore.ui.model.MangaSourceItem
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class SourceSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
class SourceSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
||||||
|
|
||||||
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||||
private val strokeColor = context.getThemeColor(materialR.attr.colorPrimary, Color.RED)
|
private val strokeColor = context.getThemeColor(appcompatR.attr.colorPrimary, Color.RED)
|
||||||
private val fillColor = ColorUtils.setAlphaComponent(
|
private val fillColor = ColorUtils.setAlphaComponent(
|
||||||
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
||||||
0x74,
|
0x74,
|
||||||
|
|||||||
@@ -13,13 +13,14 @@ import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
|||||||
import org.koitharu.kotatsu.core.util.ext.getItem
|
import org.koitharu.kotatsu.core.util.ext.getItem
|
||||||
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
||||||
import org.koitharu.kotatsu.favourites.ui.categories.adapter.CategoryListModel
|
import org.koitharu.kotatsu.favourites.ui.categories.adapter.CategoryListModel
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class CategoriesSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
class CategoriesSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
||||||
|
|
||||||
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
private val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||||
private val radius = context.resources.getDimension(R.dimen.list_selector_corner)
|
private val radius = context.resources.getDimension(R.dimen.list_selector_corner)
|
||||||
private val strokeColor = context.getThemeColor(materialR.attr.colorPrimary, Color.RED)
|
private val strokeColor = context.getThemeColor(appcompatR.attr.colorPrimary, Color.RED)
|
||||||
private val fillColor = ColorUtils.setAlphaComponent(
|
private val fillColor = ColorUtils.setAlphaComponent(
|
||||||
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
||||||
0x74,
|
0x74,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.koitharu.kotatsu.core.util.ext.setThemeTextAppearance
|
|||||||
import org.koitharu.kotatsu.core.util.ext.textAndVisible
|
import org.koitharu.kotatsu.core.util.ext.textAndVisible
|
||||||
import org.koitharu.kotatsu.databinding.ViewFilterFieldBinding
|
import org.koitharu.kotatsu.databinding.ViewFilterFieldBinding
|
||||||
import java.util.LinkedList
|
import java.util.LinkedList
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class FilterFieldLayout @JvmOverloads constructor(
|
class FilterFieldLayout @JvmOverloads constructor(
|
||||||
@@ -100,7 +101,7 @@ class FilterFieldLayout @JvmOverloads constructor(
|
|||||||
label.drawableStart = ContextCompat.getDrawable(context, R.drawable.ic_error_small)
|
label.drawableStart = ContextCompat.getDrawable(context, R.drawable.ic_error_small)
|
||||||
TextViewCompat.setCompoundDrawableTintList(
|
TextViewCompat.setCompoundDrawableTintList(
|
||||||
label,
|
label,
|
||||||
context.getThemeColorStateList(materialR.attr.colorControlNormal),
|
context.getThemeColorStateList(appcompatR.attr.colorControlNormal),
|
||||||
)
|
)
|
||||||
addView(label)
|
addView(label)
|
||||||
errorView = label
|
errorView = label
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import org.koitharu.kotatsu.parsers.model.MangaTag
|
|||||||
import org.koitharu.kotatsu.parsers.util.toTitleCase
|
import org.koitharu.kotatsu.parsers.util.toTitleCase
|
||||||
import org.koitharu.kotatsu.search.domain.MangaSearchRepository
|
import org.koitharu.kotatsu.search.domain.MangaSearchRepository
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
class FilterHeaderProducer @Inject constructor(
|
class FilterHeaderProducer @Inject constructor(
|
||||||
private val searchRepository: MangaSearchRepository,
|
private val searchRepository: MangaSearchRepository,
|
||||||
@@ -129,7 +129,7 @@ class FilterHeaderProducer @Inject constructor(
|
|||||||
result.addFirst(
|
result.addFirst(
|
||||||
ChipsView.ChipModel(
|
ChipsView.ChipModel(
|
||||||
title = snapshot.query,
|
title = snapshot.query,
|
||||||
icon = materialR.drawable.abc_ic_search_api_material,
|
icon = appcompatR.drawable.abc_ic_search_api_material,
|
||||||
isCloseable = true,
|
isCloseable = true,
|
||||||
data = snapshot.query,
|
data = snapshot.query,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import org.koitharu.kotatsu.core.util.ext.start
|
|||||||
import org.koitharu.kotatsu.databinding.ActivityImageBinding
|
import org.koitharu.kotatsu.databinding.ActivityImageBinding
|
||||||
import org.koitharu.kotatsu.databinding.ItemErrorStateBinding
|
import org.koitharu.kotatsu.databinding.ItemErrorStateBinding
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ImageActivity : BaseActivity<ActivityImageBinding>(),
|
class ImageActivity : BaseActivity<ActivityImageBinding>(),
|
||||||
@@ -147,12 +147,12 @@ class ImageActivity : BaseActivity<ActivityImageBinding>(),
|
|||||||
button.setImageDrawable(
|
button.setImageDrawable(
|
||||||
CircularProgressDrawable(this).also {
|
CircularProgressDrawable(this).also {
|
||||||
it.setStyle(CircularProgressDrawable.LARGE)
|
it.setStyle(CircularProgressDrawable.LARGE)
|
||||||
it.setColorSchemeColors(getThemeColor(materialR.attr.colorControlNormal))
|
it.setColorSchemeColors(getThemeColor(appcompatR.attr.colorControlNormal))
|
||||||
it.start()
|
it.start()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
button.setImageResource(materialR.drawable.abc_ic_menu_overflow_material)
|
button.setImageResource(appcompatR.drawable.abc_ic_menu_overflow_material)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ import org.koitharu.kotatsu.core.ui.list.decor.AbstractSelectionItemDecoration
|
|||||||
import org.koitharu.kotatsu.core.util.ext.getItem
|
import org.koitharu.kotatsu.core.util.ext.getItem
|
||||||
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
import org.koitharu.kotatsu.core.util.ext.getThemeColor
|
||||||
import org.koitharu.kotatsu.list.ui.model.MangaListModel
|
import org.koitharu.kotatsu.list.ui.model.MangaListModel
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
open class MangaSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
open class MangaSelectionDecoration(context: Context) : AbstractSelectionItemDecoration() {
|
||||||
|
|
||||||
protected val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
protected val paint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||||
protected val strokeColor = context.getThemeColor(materialR.attr.colorPrimary, Color.RED)
|
protected val strokeColor = context.getThemeColor(appcompatR.attr.colorPrimary, Color.RED)
|
||||||
protected val fillColor = ColorUtils.setAlphaComponent(
|
protected val fillColor = ColorUtils.setAlphaComponent(
|
||||||
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
ColorUtils.blendARGB(strokeColor, context.getThemeColor(materialR.attr.colorSurface), 0.8f),
|
||||||
0x74,
|
0x74,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import org.koitharu.kotatsu.core.util.ext.observe
|
|||||||
import org.koitharu.kotatsu.core.util.ext.observeEvent
|
import org.koitharu.kotatsu.core.util.ext.observeEvent
|
||||||
import org.koitharu.kotatsu.core.util.ext.setProgressIcon
|
import org.koitharu.kotatsu.core.util.ext.setProgressIcon
|
||||||
import org.koitharu.kotatsu.databinding.DialogLocalInfoBinding
|
import org.koitharu.kotatsu.databinding.DialogLocalInfoBinding
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class LocalInfoDialog : AlertDialogFragment<DialogLocalInfoBinding>(), View.OnClickListener {
|
class LocalInfoDialog : AlertDialogFragment<DialogLocalInfoBinding>(), View.OnClickListener {
|
||||||
@@ -86,7 +86,7 @@ class LocalInfoDialog : AlertDialogFragment<DialogLocalInfoBinding>(), View.OnCl
|
|||||||
val total = size + available
|
val total = size + available
|
||||||
val segment = SegmentedBarView.Segment(
|
val segment = SegmentedBarView.Segment(
|
||||||
percent = (size.toDouble() / total.toDouble()).toFloat(),
|
percent = (size.toDouble() / total.toDouble()).toFloat(),
|
||||||
color = KotatsuColors.segmentColor(view.context, materialR.attr.colorPrimary),
|
color = KotatsuColors.segmentColor(view.context, appcompatR.attr.colorPrimary),
|
||||||
)
|
)
|
||||||
requireViewBinding().labelUsed.text = view.context.getString(
|
requireViewBinding().labelUsed.text = view.context.getString(
|
||||||
R.string.memory_usage_pattern,
|
R.string.memory_usage_pattern,
|
||||||
|
|||||||
@@ -429,9 +429,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), AppBarOwner, BottomNav
|
|||||||
supportActionBar?.apply {
|
supportActionBar?.apply {
|
||||||
setHomeAsUpIndicator(
|
setHomeAsUpIndicator(
|
||||||
if (isOpened) {
|
if (isOpened) {
|
||||||
materialR.drawable.abc_ic_ab_back_material
|
materialR.drawable.ic_arrow_back_black_24
|
||||||
} else {
|
} else {
|
||||||
materialR.drawable.abc_ic_search_api_material
|
materialR.drawable.ic_search_black_24
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
setHomeActionContentDescription(
|
setHomeActionContentDescription(
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import org.koitharu.kotatsu.scrobbling.common.domain.model.ScrobblerUser
|
|||||||
import org.koitharu.kotatsu.scrobbling.common.domain.model.ScrobblingInfo
|
import org.koitharu.kotatsu.scrobbling.common.domain.model.ScrobblingInfo
|
||||||
import org.koitharu.kotatsu.scrobbling.common.ui.config.adapter.ScrobblingMangaAdapter
|
import org.koitharu.kotatsu.scrobbling.common.ui.config.adapter.ScrobblingMangaAdapter
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ScrobblerConfigActivity : BaseActivity<ActivityScrobblerConfigBinding>(),
|
class ScrobblerConfigActivity : BaseActivity<ActivityScrobblerConfigBinding>(),
|
||||||
@@ -114,7 +114,7 @@ class ScrobblerConfigActivity : BaseActivity<ActivityScrobblerConfigBinding>(),
|
|||||||
private fun onUserChanged(user: ScrobblerUser?) {
|
private fun onUserChanged(user: ScrobblerUser?) {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
viewBinding.imageViewAvatar.disposeImageRequest()
|
viewBinding.imageViewAvatar.disposeImageRequest()
|
||||||
viewBinding.imageViewAvatar.setImageResource(materialR.drawable.abc_ic_menu_overflow_material)
|
viewBinding.imageViewAvatar.setImageResource(appcompatR.drawable.abc_ic_menu_overflow_material)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
viewBinding.imageViewAvatar.newImageRequest(this, user.avatar)
|
viewBinding.imageViewAvatar.newImageRequest(this, user.avatar)
|
||||||
|
|||||||
@@ -23,19 +23,19 @@ import org.koitharu.kotatsu.core.util.ext.drawableEnd
|
|||||||
import org.koitharu.kotatsu.core.util.ext.drawableStart
|
import org.koitharu.kotatsu.core.util.ext.drawableStart
|
||||||
import org.koitharu.kotatsu.search.domain.SearchKind
|
import org.koitharu.kotatsu.search.domain.SearchKind
|
||||||
import org.koitharu.kotatsu.search.ui.suggestion.SearchSuggestionListener
|
import org.koitharu.kotatsu.search.ui.suggestion.SearchSuggestionListener
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
private const val DRAWABLE_END = 2
|
private const val DRAWABLE_END = 2
|
||||||
|
|
||||||
class SearchEditText @JvmOverloads constructor(
|
class SearchEditText @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
@AttrRes defStyleAttr: Int = materialR.attr.editTextStyle,
|
@AttrRes defStyleAttr: Int = appcompatR.attr.editTextStyle,
|
||||||
) : AppCompatEditText(context, attrs, defStyleAttr) {
|
) : AppCompatEditText(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
var searchSuggestionListener: SearchSuggestionListener? = null
|
var searchSuggestionListener: SearchSuggestionListener? = null
|
||||||
private val clearIcon =
|
private val clearIcon =
|
||||||
ContextCompat.getDrawable(context, materialR.drawable.abc_ic_clear_material)
|
ContextCompat.getDrawable(context, appcompatR.drawable.abc_ic_clear_material)
|
||||||
private var isEmpty = text.isNullOrEmpty()
|
private var isEmpty = text.isNullOrEmpty()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import android.content.Context
|
|||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.annotation.AttrRes
|
import androidx.annotation.AttrRes
|
||||||
import com.google.android.material.R
|
|
||||||
import com.google.android.material.appbar.MaterialToolbar
|
import com.google.android.material.appbar.MaterialToolbar
|
||||||
import com.google.android.material.shape.MaterialShapeDrawable
|
import com.google.android.material.shape.MaterialShapeDrawable
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
class SearchToolbar @JvmOverloads constructor(
|
class SearchToolbar @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
@AttrRes defStyleAttr: Int = R.attr.toolbarStyle,
|
@AttrRes defStyleAttr: Int = appcompatR.attr.toolbarStyle,
|
||||||
) : MaterialToolbar(context, attrs, defStyleAttr) {
|
) : MaterialToolbar(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
private val bgDrawable = MaterialShapeDrawable(context, attrs, defStyleAttr, 0)
|
private val bgDrawable = MaterialShapeDrawable(context, attrs, defStyleAttr, 0)
|
||||||
@@ -21,4 +21,4 @@ class SearchToolbar @JvmOverloads constructor(
|
|||||||
bgDrawable.setShadowColor(Color.DKGRAY)
|
bgDrawable.setShadowColor(Color.DKGRAY)
|
||||||
background = bgDrawable
|
background = bgDrawable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import org.koitharu.kotatsu.databinding.ActivityReaderTapActionsBinding
|
|||||||
import org.koitharu.kotatsu.reader.domain.TapGridArea
|
import org.koitharu.kotatsu.reader.domain.TapGridArea
|
||||||
import org.koitharu.kotatsu.reader.ui.tapgrid.TapAction
|
import org.koitharu.kotatsu.reader.ui.tapgrid.TapAction
|
||||||
import java.util.EnumMap
|
import java.util.EnumMap
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class ReaderTapGridConfigActivity : BaseActivity<ActivityReaderTapActionsBinding>(), View.OnClickListener,
|
class ReaderTapGridConfigActivity : BaseActivity<ActivityReaderTapActionsBinding>(), View.OnClickListener,
|
||||||
@@ -157,7 +157,7 @@ class ReaderTapGridConfigActivity : BaseActivity<ActivityReaderTapActionsBinding
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createBackground(action: TapAction?): Drawable? {
|
private fun createBackground(action: TapAction?): Drawable? {
|
||||||
val ripple = getThemeDrawable(materialR.attr.selectableItemBackground)
|
val ripple = getThemeDrawable(appcompatR.attr.selectableItemBackground)
|
||||||
return if (action == null) {
|
return if (action == null) {
|
||||||
ripple
|
ripple
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import org.koitharu.kotatsu.core.util.ext.setTextAndVisible
|
|||||||
import org.koitharu.kotatsu.databinding.ItemEmptyHintBinding
|
import org.koitharu.kotatsu.databinding.ItemEmptyHintBinding
|
||||||
import org.koitharu.kotatsu.databinding.ItemSourceCatalogBinding
|
import org.koitharu.kotatsu.databinding.ItemSourceCatalogBinding
|
||||||
import org.koitharu.kotatsu.list.ui.model.ListModel
|
import org.koitharu.kotatsu.list.ui.model.ListModel
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
fun sourceCatalogItemSourceAD(
|
fun sourceCatalogItemSourceAD(
|
||||||
coil: ImageLoader,
|
coil: ImageLoader,
|
||||||
@@ -46,7 +46,7 @@ fun sourceCatalogItemSourceAD(
|
|||||||
listener.onItemClick(item, v)
|
listener.onItemClick(item, v)
|
||||||
}
|
}
|
||||||
val basePadding = context.getThemeDimensionPixelOffset(
|
val basePadding = context.getThemeDimensionPixelOffset(
|
||||||
materialR.attr.listPreferredItemPaddingEnd,
|
appcompatR.attr.listPreferredItemPaddingEnd,
|
||||||
binding.root.paddingStart,
|
binding.root.paddingStart,
|
||||||
)
|
)
|
||||||
binding.root.updatePaddingRelative(
|
binding.root.updatePaddingRelative(
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.koitharu.kotatsu.parsers.util.replaceWith
|
|||||||
import org.koitharu.kotatsu.parsers.util.toIntUp
|
import org.koitharu.kotatsu.parsers.util.toIntUp
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
import androidx.appcompat.R as appcompatR
|
||||||
import com.google.android.material.R as materialR
|
import com.google.android.material.R as materialR
|
||||||
|
|
||||||
class BarChartView @JvmOverloads constructor(
|
class BarChartView @JvmOverloads constructor(
|
||||||
@@ -38,7 +39,7 @@ class BarChartView @JvmOverloads constructor(
|
|||||||
private val chartBounds = RectF()
|
private val chartBounds = RectF()
|
||||||
|
|
||||||
@ColorInt
|
@ColorInt
|
||||||
var barColor: Int = context.getThemeColor(materialR.attr.colorAccent)
|
var barColor: Int = context.getThemeColor(appcompatR.attr.colorAccent)
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
field = value
|
||||||
invalidate()
|
invalidate()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import org.koitharu.kotatsu.core.util.ext.mangaSourceExtra
|
|||||||
import org.koitharu.kotatsu.core.util.ext.newImageRequest
|
import org.koitharu.kotatsu.core.util.ext.newImageRequest
|
||||||
import org.koitharu.kotatsu.databinding.ItemTrackDebugBinding
|
import org.koitharu.kotatsu.databinding.ItemTrackDebugBinding
|
||||||
import org.koitharu.kotatsu.tracker.data.TrackEntity
|
import org.koitharu.kotatsu.tracker.data.TrackEntity
|
||||||
import com.google.android.material.R as materialR
|
import androidx.appcompat.R as appcompatR
|
||||||
|
|
||||||
fun trackDebugAD(
|
fun trackDebugAD(
|
||||||
lifecycleOwner: LifecycleOwner,
|
lifecycleOwner: LifecycleOwner,
|
||||||
@@ -58,7 +58,7 @@ fun trackDebugAD(
|
|||||||
if (item.lastResult == TrackEntity.RESULT_FAILED) {
|
if (item.lastResult == TrackEntity.RESULT_FAILED) {
|
||||||
append(" - ")
|
append(" - ")
|
||||||
bold {
|
bold {
|
||||||
color(context.getThemeColor(materialR.attr.colorError, Color.RED)) {
|
color(context.getThemeColor(appcompatR.attr.colorError, Color.RED)) {
|
||||||
append(item.lastError ?: getString(R.string.error))
|
append(item.lastError ?: getString(R.string.error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:max="100"
|
android:max="100"
|
||||||
app:hideAnimationBehavior="escape"
|
app:hideAnimationBehavior="escape"
|
||||||
app:showAnimationBehavior="outward" />
|
app:showAnimationBehavior="none" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layout_error"
|
android:id="@+id/layout_error"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button_retry"
|
android:id="@+id/button_retry"
|
||||||
style="@style/Widget.Material3.Button.TonalButton"
|
style="?materialButtonTonalStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button_error_details"
|
android:id="@+id/button_error_details"
|
||||||
style="@style/Widget.Material3.Button.TextButton"
|
style="?borderlessButtonStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/details" />
|
android:text="@string/details" />
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ coroutines = "1.10.1"
|
|||||||
desugar = "2.1.5"
|
desugar = "2.1.5"
|
||||||
diskLruCache = "1.5"
|
diskLruCache = "1.5"
|
||||||
fragment = "1.8.6"
|
fragment = "1.8.6"
|
||||||
gradle = "8.9.0"
|
gradle = "8.9.1"
|
||||||
guava = "33.4.5-android"
|
guava = "33.4.6-android"
|
||||||
dagger = "2.56"
|
dagger = "2.56.1"
|
||||||
hilt = "1.2.0"
|
hilt = "1.2.0"
|
||||||
json = "20250107"
|
json = "20250107"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
@@ -27,11 +27,11 @@ ksp = "2.1.20-1.0.31"
|
|||||||
leakcanary = "3.0-alpha-8"
|
leakcanary = "3.0-alpha-8"
|
||||||
lifecycle = "2.8.7"
|
lifecycle = "2.8.7"
|
||||||
markwon = "4.6.2"
|
markwon = "4.6.2"
|
||||||
material = "1.13.0-alpha11"
|
material = "1.13.0-alpha12"
|
||||||
moshi = "1.15.2"
|
moshi = "1.15.2"
|
||||||
okhttp = "4.12.0"
|
okhttp = "4.12.0"
|
||||||
okio = "3.10.2"
|
okio = "3.10.2"
|
||||||
parsers = "5fa7590550"
|
parsers = "dbb04d2051"
|
||||||
preference = "1.2.1"
|
preference = "1.2.1"
|
||||||
recyclerview = "1.4.0"
|
recyclerview = "1.4.0"
|
||||||
room = "2.6.1"
|
room = "2.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user