mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Import android.R
as AR
In order to make migration to moko-resources easier
This commit is contained in:
parent
31c253f724
commit
4c66025900
67 changed files with 219 additions and 154 deletions
|
@ -1,6 +1,5 @@
|
|||
package eu.kanade.tachiyomi.data.coil
|
||||
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isVisible
|
||||
|
@ -9,6 +8,7 @@ import coil3.Image
|
|||
import coil3.target.ImageViewTarget
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import android.R as AR
|
||||
|
||||
class CoverViewTarget(
|
||||
view: ImageView,
|
||||
|
@ -26,7 +26,7 @@ class CoverViewTarget(
|
|||
R.drawable.ic_broken_image_24dp,
|
||||
null,
|
||||
)
|
||||
vector?.setTint(view.context.getResourceColor(android.R.attr.textColorSecondary))
|
||||
vector?.setTint(view.context.getResourceColor(AR.attr.textColorSecondary))
|
||||
view.setImageDrawable(vector)
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ import eu.kanade.tachiyomi.util.system.localeContext
|
|||
import eu.kanade.tachiyomi.util.system.notificationBuilder
|
||||
import eu.kanade.tachiyomi.util.system.notificationManager
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.regex.Pattern
|
||||
import java.util.regex.*
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* DownloadNotifier is used to show notifications when downloading one or multiple chapters.
|
||||
|
@ -70,7 +71,7 @@ internal class DownloadNotifier(private val context: Context) {
|
|||
with(notification) {
|
||||
// Check if first call.
|
||||
if (!isDownloading) {
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setAutoCancel(false)
|
||||
clearActions()
|
||||
setOngoing(true)
|
||||
|
@ -117,7 +118,7 @@ internal class DownloadNotifier(private val context: Context) {
|
|||
with(notification) {
|
||||
// Check if first call.
|
||||
if (!isDownloading) {
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setAutoCancel(false)
|
||||
clearActions()
|
||||
setOngoing(true)
|
||||
|
@ -269,7 +270,7 @@ internal class DownloadNotifier(private val context: Context) {
|
|||
error ?: context.getString(R.string.could_not_download_unexpected_error),
|
||||
),
|
||||
)
|
||||
setSmallIcon(android.R.drawable.stat_sys_warning)
|
||||
setSmallIcon(AR.drawable.stat_sys_warning)
|
||||
setCategory(NotificationCompat.CATEGORY_ERROR)
|
||||
setOngoing(false)
|
||||
clearActions()
|
||||
|
|
|
@ -36,7 +36,7 @@ import kotlinx.coroutines.DelicateCoroutinesApi
|
|||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.ArrayList
|
||||
import android.R as AR
|
||||
|
||||
class LibraryUpdateNotifier(private val context: Context) {
|
||||
|
||||
|
@ -68,7 +68,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
setOnlyAlertOnce(true)
|
||||
setProgress(0, 0, true)
|
||||
color = ContextCompat.getColor(context, R.color.secondaryTachiyomi)
|
||||
addAction(R.drawable.ic_close_24dp, context.getString(android.R.string.cancel), cancelIntent)
|
||||
addAction(R.drawable.ic_close_24dp, context.getString(AR.string.cancel), cancelIntent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
|||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.notificationManager
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* DownloadNotifier is used to show notifications when downloading and update.
|
||||
|
@ -28,7 +29,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
*/
|
||||
val notificationBuilder by lazy {
|
||||
NotificationCompat.Builder(context, Notifications.CHANNEL_COMMON).apply {
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
}
|
||||
}
|
||||
|
@ -67,13 +68,13 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
)
|
||||
setContentIntent(pendingIntent)
|
||||
setAutoCancel(true)
|
||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
||||
setSmallIcon(AR.drawable.stat_sys_download_done)
|
||||
color = context.getResourceColor(R.attr.colorSecondary)
|
||||
clearActions()
|
||||
val isOnA12 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
|
||||
// Download action
|
||||
addAction(
|
||||
android.R.drawable.stat_sys_download_done,
|
||||
AR.drawable.stat_sys_download_done,
|
||||
context.getString(if (isOnA12) R.string.update else R.string.download),
|
||||
NotificationReceiver.startAppUpdatePendingJob(context, url, true),
|
||||
)
|
||||
|
@ -104,7 +105,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
with(notificationBuilder) {
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
setContentText(context.getString(R.string.downloading))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setProgress(0, 0, true)
|
||||
setAutoCancel(false)
|
||||
setOngoing(true)
|
||||
|
@ -129,7 +130,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
with(notificationBuilder) {
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
setContentText(context.getString(R.string.downloading))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setProgress(100, progress, false)
|
||||
setOnlyAlertOnce(true)
|
||||
clearActions()
|
||||
|
@ -145,7 +146,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
fun onInstalling() {
|
||||
with(NotificationCompat.Builder(context, Notifications.CHANNEL_INSTALLING)) {
|
||||
setContentTitle(context.getString(R.string.installing))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setProgress(0, 0, true)
|
||||
setOnlyAlertOnce(true)
|
||||
clearActions()
|
||||
|
@ -161,7 +162,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
fun onDownloadFinished(uri: Uri) {
|
||||
with(notificationBuilder) {
|
||||
setContentText(context.getString(R.string.download_complete))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download_done)
|
||||
setSmallIcon(AR.drawable.stat_sys_download_done)
|
||||
setAutoCancel(false)
|
||||
setOnlyAlertOnce(false)
|
||||
setProgress(0, 0, false)
|
||||
|
@ -219,7 +220,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
fun onDownloadError(url: String) {
|
||||
with(notificationBuilder) {
|
||||
setContentText(context.getString(R.string.download_error))
|
||||
setSmallIcon(android.R.drawable.stat_sys_warning)
|
||||
setSmallIcon(AR.drawable.stat_sys_warning)
|
||||
setOnlyAlertOnce(false)
|
||||
setAutoCancel(false)
|
||||
setProgress(0, 0, false)
|
||||
|
@ -246,7 +247,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
with(notificationBuilder) {
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
setContentText(context.getString(R.string.could_not_install_update))
|
||||
setSmallIcon(android.R.drawable.stat_sys_warning)
|
||||
setSmallIcon(AR.drawable.stat_sys_warning)
|
||||
setOnlyAlertOnce(false)
|
||||
setAutoCancel(false)
|
||||
setProgress(0, 0, false)
|
||||
|
|
|
@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
|||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.util.system.notificationBuilder
|
||||
import eu.kanade.tachiyomi.util.system.notificationManager
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionInstallNotifier(private val context: Context) {
|
||||
|
||||
|
@ -31,7 +32,7 @@ class ExtensionInstallNotifier(private val context: Context) {
|
|||
val progressNotificationBuilder by lazy {
|
||||
context.notificationBuilder(Notifications.CHANNEL_EXT_PROGRESS) {
|
||||
setContentTitle(context.getString(R.string.app_name))
|
||||
setSmallIcon(android.R.drawable.stat_sys_download)
|
||||
setSmallIcon(AR.drawable.stat_sys_download)
|
||||
setLargeIcon(notificationBitmap)
|
||||
setContentTitle(context.getString(R.string.updating_extensions))
|
||||
setProgress(0, 0, true)
|
||||
|
@ -39,7 +40,7 @@ class ExtensionInstallNotifier(private val context: Context) {
|
|||
setSilent(true)
|
||||
setOnlyAlertOnce(true)
|
||||
color = ContextCompat.getColor(context, R.color.secondaryTachiyomi)
|
||||
addAction(R.drawable.ic_close_24dp, context.getString(android.R.string.cancel), cancelIntent)
|
||||
addAction(R.drawable.ic_close_24dp, context.getString(AR.string.cancel), cancelIntent)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import kotlin.math.abs
|
|||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
class ExpandedAppBarLayout@JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
AppBarLayout(context, attrs) {
|
||||
|
@ -390,9 +391,9 @@ class ExpandedAppBarLayout@JvmOverloads constructor(context: Context, attrs: Att
|
|||
val halfWay = compactAppBarHeight / 2
|
||||
val shortAnimationDuration = resources?.getInteger(
|
||||
if (toolbarMode != ToolbarState.EXPANDED) {
|
||||
android.R.integer.config_shortAnimTime
|
||||
AR.integer.config_shortAnimTime
|
||||
} else {
|
||||
android.R.integer.config_longAnimTime
|
||||
AR.integer.config_longAnimTime
|
||||
},
|
||||
) ?: 0
|
||||
val realHeight = preLayoutHeightWhileSearching + paddingTop
|
||||
|
|
|
@ -18,6 +18,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import android.R as AR
|
||||
|
||||
class MiniSearchView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
SearchView(context, attrs) {
|
||||
|
@ -26,7 +27,7 @@ class MiniSearchView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
private val searchTextView: SearchAutoComplete? = findViewById(androidx.appcompat.R.id.search_src_text)
|
||||
|
||||
init {
|
||||
searchTextView?.setTextAppearance(android.R.style.TextAppearance_Material_Body1)
|
||||
searchTextView?.setTextAppearance(AR.style.TextAppearance_Material_Body1)
|
||||
val actionColorAlpha =
|
||||
ColorUtils.setAlphaComponent(context.getResourceColor(R.attr.actionBarTintColor), 200)
|
||||
searchTextView?.setTextColor(actionColorAlpha)
|
||||
|
|
|
@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.util.system.setLocaleByAppCompat
|
|||
import eu.kanade.tachiyomi.util.system.setThemeByPref
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import yokai.domain.SplashState
|
||||
import android.R as AR
|
||||
|
||||
abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() {
|
||||
|
||||
|
@ -62,7 +63,7 @@ abstract class BaseActivity<VB : ViewBinding> : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun SplashScreen.setSplashScreenExitAnimation() {
|
||||
val root = findViewById<View>(android.R.id.content)
|
||||
val root = findViewById<View>(AR.id.content)
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
|
||||
this.setOnExitAnimationListener { splashProvider ->
|
||||
|
|
|
@ -18,6 +18,7 @@ import eu.kanade.tachiyomi.util.system.materialAlertDialog
|
|||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import eu.kanade.tachiyomi.util.view.liftAppbarWith
|
||||
import eu.kanade.tachiyomi.util.view.snack
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* Controller to manage the categories for the users' library.
|
||||
|
@ -132,7 +133,7 @@ class CategoryController(bundle: Bundle? = null) :
|
|||
.setPositiveButton(R.string.delete) { _, _ ->
|
||||
deleteCategory(position)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import eu.kanade.tachiyomi.util.system.materialAlertDialog
|
|||
import eu.kanade.tachiyomi.util.view.withFadeTransaction
|
||||
import eu.kanade.tachiyomi.widget.TriStateCheckBox
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import android.R as AR
|
||||
|
||||
class ManageCategoryDialog(bundle: Bundle? = null) :
|
||||
DialogController(bundle) {
|
||||
|
@ -54,7 +55,7 @@ class ManageCategoryDialog(bundle: Bundle? = null) :
|
|||
setTitle(if (category == null) R.string.new_category else R.string.manage_category)
|
||||
binding = MangaCategoryDialogBinding.inflate(activity.layoutInflater)
|
||||
setView(binding.root)
|
||||
setNegativeButton(android.R.string.cancel, null)
|
||||
setNegativeButton(AR.string.cancel, null)
|
||||
setPositiveButton(R.string.save) { dialog, _ ->
|
||||
if (onPositiveButtonClick()) {
|
||||
dialog.dismiss()
|
||||
|
|
|
@ -46,6 +46,7 @@ import uy.kohesive.injekt.api.get
|
|||
import uy.kohesive.injekt.injectLazy
|
||||
import yokai.domain.base.BasePreferences
|
||||
import yokai.domain.base.BasePreferences.ExtensionInstaller
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionBottomSheet @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
LinearLayout(context, attrs),
|
||||
|
@ -231,7 +232,7 @@ class ExtensionBottomSheet @JvmOverloads constructor(context: Context, attrs: At
|
|||
controller.activity!!.materialAlertDialog()
|
||||
.setTitle(R.string.update_all)
|
||||
.setMessage(R.string.some_extensions_may_prompt)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
presenter.preferences.hasPromptedBeforeUpdateAll().set(true)
|
||||
updateAllExtensions(position)
|
||||
}
|
||||
|
@ -435,7 +436,7 @@ class ExtensionBottomSheet @JvmOverloads constructor(context: Context, attrs: At
|
|||
.setPositiveButton(R.string.remove) { _, _ ->
|
||||
presenter.uninstallExtension(pkgName)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,13 +7,14 @@ import android.graphics.drawable.Drawable
|
|||
import android.view.View
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionDividerItemDecoration(context: Context) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {
|
||||
|
||||
private val divider: Drawable
|
||||
|
||||
init {
|
||||
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
|
||||
val a = context.obtainStyledAttributes(intArrayOf(AR.attr.listDivider))
|
||||
divider = a.getDrawable(0)!!
|
||||
a.recycle()
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ import eu.kanade.tachiyomi.util.system.contextCompatDrawable
|
|||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.timeSpanFromNow
|
||||
import eu.kanade.tachiyomi.util.view.resetStrokeColor
|
||||
import java.util.Locale
|
||||
import java.util.*
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionHolder(view: View, val adapter: ExtensionAdapter) :
|
||||
BaseFlexibleViewHolder(view, adapter) {
|
||||
|
@ -82,7 +83,7 @@ class ExtensionHolder(view: View, val adapter: ExtensionAdapter) :
|
|||
binding.extTitle.text = if (infoText.size > 1) {
|
||||
buildSpannedString {
|
||||
append(extension.name + " ")
|
||||
color(binding.extTitle.context.getResourceColor(android.R.attr.textColorSecondary)) {
|
||||
color(binding.extTitle.context.getResourceColor(AR.attr.textColorSecondary)) {
|
||||
scale(0.75f) {
|
||||
append(LocaleHelper.getDisplayName(extension.lang))
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import eu.kanade.tachiyomi.ui.extension.getApplicationIcon
|
|||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import eu.kanade.tachiyomi.util.system.materialAlertDialog
|
||||
import eu.kanade.tachiyomi.util.view.inflate
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionDetailsHeaderAdapter(private val presenter: ExtensionDetailsPresenter) :
|
||||
RecyclerView.Adapter<ExtensionDetailsHeaderAdapter.HeaderViewHolder>() {
|
||||
|
@ -58,7 +59,7 @@ class ExtensionDetailsHeaderAdapter(private val presenter: ExtensionDetailsPrese
|
|||
.setPositiveButton(R.string.remove) { _, _ ->
|
||||
presenter.uninstallExtension()
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,14 @@ import androidx.preference.SwitchPreferenceCompat
|
|||
import androidx.recyclerview.widget.ConcatAdapter
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import android.R as AR
|
||||
|
||||
class ExtensionSettingsDividerItemDecoration(context: Context) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {
|
||||
|
||||
private val divider: Drawable
|
||||
|
||||
init {
|
||||
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
|
||||
val a = context.obtainStyledAttributes(intArrayOf(AR.attr.listDivider))
|
||||
divider = a.getDrawable(0)!!
|
||||
a.recycle()
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ import kotlin.math.max
|
|||
import kotlin.math.roundToInt
|
||||
import kotlin.random.Random
|
||||
import kotlin.random.nextInt
|
||||
import android.R as AR
|
||||
|
||||
open class LibraryController(
|
||||
bundle: Bundle? = null,
|
||||
|
@ -399,7 +400,7 @@ open class LibraryController(
|
|||
|
||||
fun updateHopperPosition() {
|
||||
val shortAnimationDuration = resources?.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
) ?: 0
|
||||
if (preferences.autohideHopper().get()) {
|
||||
val bottomBar = if (isSubClass) null else activityBinding?.bottomNav
|
||||
|
@ -1134,7 +1135,7 @@ open class LibraryController(
|
|||
adapter.setItems(mangaMap)
|
||||
if (binding.libraryGridRecycler.recycler.translationX != 0f) {
|
||||
val time = binding.root.resources.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
).toLong()
|
||||
viewScope.launchUI {
|
||||
delay(time / 2)
|
||||
|
@ -2049,7 +2050,7 @@ open class LibraryController(
|
|||
presenter.confirmDeletion(mangas, false)
|
||||
}
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show().apply {
|
||||
disableItems(arrayOf(options.first()))
|
||||
}
|
||||
|
@ -2063,7 +2064,7 @@ open class LibraryController(
|
|||
.setPositiveButton(R.string.mark_as_read) { _, _ ->
|
||||
markReadStatus(R.string.marked_as_read, true)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
R.id.action_mark_as_unread -> {
|
||||
|
@ -2072,7 +2073,7 @@ open class LibraryController(
|
|||
.setPositiveButton(R.string.mark_as_unread) { _, _ ->
|
||||
markReadStatus(R.string.marked_as_unread, false)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
R.id.action_migrate -> {
|
||||
|
|
|
@ -29,6 +29,7 @@ import eu.kanade.tachiyomi.util.view.checkHeightThen
|
|||
import eu.kanade.tachiyomi.util.view.expand
|
||||
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import android.R as AR
|
||||
|
||||
class ExpandedFilterSheet(
|
||||
private val activity: Activity,
|
||||
|
@ -177,7 +178,7 @@ class ExpandedFilterSheet(
|
|||
context.materialAlertDialog()
|
||||
.setTitle(R.string.reorder_filters)
|
||||
.setView(recycler)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(R.string.reorder) { _, _ ->
|
||||
val order = adapter.currentItems.map { it.char }.joinToString("")
|
||||
preferences.filterOrder().set(order)
|
||||
|
|
|
@ -148,6 +148,7 @@ import kotlin.collections.set
|
|||
import kotlin.math.abs
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToLong
|
||||
import android.R as AR
|
||||
|
||||
@SuppressLint("ResourceType")
|
||||
open class MainActivity : BaseActivity<MainActivityBinding>() {
|
||||
|
@ -184,7 +185,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
|
||||
val velocityTracker: VelocityTracker by lazy { VelocityTracker.obtain() }
|
||||
private val actionButtonSize: Pair<Int, Int> by lazy {
|
||||
val attrs = intArrayOf(android.R.attr.minWidth, android.R.attr.minHeight)
|
||||
val attrs = intArrayOf(AR.attr.minWidth, AR.attr.minHeight)
|
||||
val ta = obtainStyledAttributes(androidx.appcompat.R.style.Widget_AppCompat_ActionButton, attrs)
|
||||
val dimenW = ta.getDimensionPixelSize(0, 0.dpToPx)
|
||||
val dimenH = ta.getDimensionPixelSize(1, 0.dpToPx)
|
||||
|
@ -198,7 +199,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
materialAlertDialog()
|
||||
.setTitle(R.string.warning)
|
||||
.setMessage(R.string.allow_notifications_recommended)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setPositiveButton(AR.string.ok, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
@ -872,7 +873,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
// if the android q+ device has gesture nav, transparent nav bar
|
||||
// this is here in case some crazy with a notch uses landscape
|
||||
insets.isBottomTappable() -> {
|
||||
getColor(android.R.color.transparent)
|
||||
getColor(AR.color.transparent)
|
||||
}
|
||||
// if in landscape with 2/3 button mode, fully opaque nav bar
|
||||
insets.hasSideNavBar() -> {
|
||||
|
@ -904,13 +905,13 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
Settings.Global.ANIMATOR_DURATION_SCALE,
|
||||
1.0f,
|
||||
)
|
||||
val duration = resources.getInteger(android.R.integer.config_mediumAnimTime) * scale
|
||||
val duration = resources.getInteger(AR.integer.config_mediumAnimTime) * scale
|
||||
delay(duration.toLong())
|
||||
delay(100)
|
||||
if (Color.alpha(window?.statusBarColor ?: Color.BLACK) >= 255) {
|
||||
window?.statusBarColor =
|
||||
getResourceColor(
|
||||
android.R.attr.statusBarColor,
|
||||
AR.attr.statusBarColor,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -921,7 +922,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
window?.statusBarColor = if (show) {
|
||||
ColorUtils.setAlphaComponent(window?.statusBarColor ?: Color.TRANSPARENT, 0)
|
||||
} else {
|
||||
val color = getResourceColor(android.R.attr.statusBarColor)
|
||||
val color = getResourceColor(AR.attr.statusBarColor)
|
||||
ColorUtils.setAlphaComponent(window?.statusBarColor ?: color, Color.alpha(color))
|
||||
}
|
||||
}
|
||||
|
@ -968,7 +969,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||
.titleTextColorInt(getResourceColor(R.attr.colorOnSecondary)).descriptionTextSize(16)
|
||||
.descriptionTextColorInt(getResourceColor(R.attr.colorOnSecondary))
|
||||
.icon(contextCompatDrawable(R.drawable.ic_recent_read_32dp))
|
||||
.targetCircleColor(android.R.color.white)
|
||||
.targetCircleColor(AR.color.white)
|
||||
.targetRadius(45),
|
||||
object : TapTargetView.Listener() {
|
||||
override fun onTargetClick(view: TapTargetView) {
|
||||
|
|
|
@ -17,10 +17,10 @@ import coil3.load
|
|||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.chip.ChipGroup
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.coil.MangaCoverFetcher
|
||||
import eu.kanade.tachiyomi.data.coil.loadManga
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.databinding.EditMangaDialogBinding
|
||||
import eu.kanade.tachiyomi.extension.ExtensionManager
|
||||
import eu.kanade.tachiyomi.source.LocalSource
|
||||
|
@ -39,6 +39,7 @@ import eu.kanade.tachiyomi.widget.TachiyomiTextInputEditText
|
|||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import android.R as AR
|
||||
|
||||
class EditMangaDialog : DialogController {
|
||||
|
||||
|
@ -74,7 +75,7 @@ class EditMangaDialog : DialogController {
|
|||
binding = EditMangaDialogBinding.inflate(activity!!.layoutInflater)
|
||||
val dialog = activity!!.materialAlertDialog().apply {
|
||||
setView(binding.root)
|
||||
setNegativeButton(android.R.string.cancel, null)
|
||||
setNegativeButton(AR.string.cancel, null)
|
||||
setPositiveButton(R.string.save) { _, _ -> onPositiveButtonClick() }
|
||||
}
|
||||
onViewCreated()
|
||||
|
|
|
@ -45,6 +45,7 @@ import uy.kohesive.injekt.injectLazy
|
|||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import android.R as AR
|
||||
|
||||
class FullCoverDialog(val controller: MangaDetailsController, drawable: Drawable, private val thumbView: View) :
|
||||
ComponentDialog(controller.activity!!, R.style.FullCoverDialogTheme) {
|
||||
|
@ -58,7 +59,7 @@ class FullCoverDialog(val controller: MangaDetailsController, drawable: Drawable
|
|||
private val fullRatio = 0f
|
||||
private val shortAnimationDuration = (
|
||||
activity?.resources?.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
) ?: 0
|
||||
).toLong()
|
||||
|
||||
|
|
|
@ -139,6 +139,7 @@ import java.io.IOException
|
|||
import java.util.*
|
||||
import kotlin.math.max
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
class MangaDetailsController :
|
||||
BaseCoroutineController<MangaDetailsControllerBinding, MangaDetailsPresenter>,
|
||||
|
@ -702,7 +703,7 @@ class MangaDetailsController :
|
|||
activityBinding?.appBar?.setBackgroundColor(colorSurface)
|
||||
}
|
||||
activity?.window?.statusBarColor = activity?.getResourceColor(
|
||||
android.R.attr.statusBarColor,
|
||||
AR.attr.statusBarColor,
|
||||
) ?: colorSurface
|
||||
}
|
||||
}
|
||||
|
@ -1161,7 +1162,7 @@ class MangaDetailsController :
|
|||
.setPositiveButton(R.string.mark_as_read) { _, _ ->
|
||||
markAsRead(presenter.chapters)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
R.id.remove_all, R.id.remove_read, R.id.remove_non_bookmarked, R.id.remove_custom -> massDeleteChapters(item.itemId)
|
||||
|
@ -1171,7 +1172,7 @@ class MangaDetailsController :
|
|||
.setPositiveButton(R.string.mark_as_unread) { _, _ ->
|
||||
markAsUnread(presenter.chapters)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
R.id.download_next, R.id.download_next_5, R.id.download_custom, R.id.download_unread, R.id.download_all -> downloadChapters(
|
||||
|
@ -1333,7 +1334,7 @@ class MangaDetailsController :
|
|||
.setPositiveButton(R.string.remove) { _, _ ->
|
||||
presenter.deleteChapters(chapters, isEverything = isEverything)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
|
|
@ -7,13 +7,14 @@ import android.graphics.drawable.Drawable
|
|||
import android.view.View
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import android.R as AR
|
||||
|
||||
class MangaDetailsDivider(context: Context, val padding: Int = 12.dpToPx) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {
|
||||
|
||||
private val divider: Drawable
|
||||
|
||||
init {
|
||||
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
|
||||
val a = context.obtainStyledAttributes(intArrayOf(AR.attr.listDivider))
|
||||
divider = a.getDrawable(0)!!
|
||||
a.recycle()
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
|||
import eu.kanade.tachiyomi.util.system.isInNightMode
|
||||
import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import eu.kanade.tachiyomi.util.view.resetStrokeColor
|
||||
import android.R as AR
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
class MangaHeaderHolder(
|
||||
|
@ -210,7 +211,7 @@ class MangaHeaderHolder(
|
|||
.addTransition(androidx.transition.Fade())
|
||||
.addTransition(androidx.transition.Slide())
|
||||
transition.duration = binding.root.resources.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
).toLong()
|
||||
androidx.transition.TransitionManager.beginDelayedTransition(
|
||||
adapter.controller.binding.recycler,
|
||||
|
@ -241,7 +242,7 @@ class MangaHeaderHolder(
|
|||
.addTransition(androidx.transition.ChangeBounds())
|
||||
.addTransition(androidx.transition.Fade())
|
||||
transition.duration = binding.root.resources.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
).toLong()
|
||||
androidx.transition.TransitionManager.beginDelayedTransition(
|
||||
adapter.controller.binding.recycler,
|
||||
|
@ -498,7 +499,7 @@ class MangaHeaderHolder(
|
|||
),
|
||||
)
|
||||
val states = arrayOf(
|
||||
intArrayOf(-android.R.attr.state_activated),
|
||||
intArrayOf(-AR.attr.state_activated),
|
||||
intArrayOf(),
|
||||
)
|
||||
val colors = intArrayOf(
|
||||
|
@ -596,7 +597,7 @@ class MangaHeaderHolder(
|
|||
filterButton.imageTintList = ColorStateList.valueOf(accentColor)
|
||||
|
||||
val states = arrayOf(
|
||||
intArrayOf(-android.R.attr.state_enabled),
|
||||
intArrayOf(-AR.attr.state_enabled),
|
||||
intArrayOf(),
|
||||
)
|
||||
|
||||
|
@ -609,7 +610,7 @@ class MangaHeaderHolder(
|
|||
|
||||
val textColors = intArrayOf(
|
||||
ColorUtils.setAlphaComponent(root.context.getResourceColor(R.attr.colorOnSurface), 97),
|
||||
root.context.getResourceColor(android.R.attr.textColorPrimaryInverse),
|
||||
root.context.getResourceColor(AR.attr.textColorPrimaryInverse),
|
||||
)
|
||||
startReadingButton.setTextColor(ColorStateList(states, textColors))
|
||||
trackButton.iconTint = ColorStateList.valueOf(accentColor)
|
||||
|
|
|
@ -18,6 +18,7 @@ import eu.kanade.tachiyomi.util.chapter.ChapterUtil.Companion.preferredChapterNa
|
|||
import eu.kanade.tachiyomi.util.isLocal
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import android.R as AR
|
||||
|
||||
class ChapterHolder(
|
||||
view: View,
|
||||
|
@ -154,7 +155,7 @@ class ChapterHolder(
|
|||
adapter.delegate.accentColor()?.let {
|
||||
binding.startView.backgroundTintList = ColorStateList.valueOf(it)
|
||||
binding.bookmark.imageTintList = ColorStateList.valueOf(
|
||||
context.getResourceColor(android.R.attr.textColorPrimaryInverse),
|
||||
context.getResourceColor(AR.attr.textColorPrimaryInverse),
|
||||
)
|
||||
TextViewCompat.setCompoundDrawableTintList(
|
||||
binding.chapterTitle,
|
||||
|
|
|
@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.util.view.setBottomEdge
|
|||
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
|
||||
import eu.kanade.tachiyomi.widget.SortTextView
|
||||
import kotlin.math.max
|
||||
import android.R as AR
|
||||
|
||||
class ChaptersSortBottomSheet(controller: MangaDetailsController) :
|
||||
E2EBottomSheetDialog<ChapterSortBottomSheetBinding>(controller.activity!!) {
|
||||
|
@ -179,7 +180,7 @@ class ChaptersSortBottomSheet(controller: MangaDetailsController) :
|
|||
alertDialog?.getButton(BUTTON_POSITIVE)?.isEnabled =
|
||||
scanlators.size != filteredScanlators.size
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(R.string.filter) { _, _ ->
|
||||
presenter.setScanlatorFilter(filteredScanlators)
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseViewHolder
|
|||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.text.DateFormat
|
||||
import android.R as AR
|
||||
|
||||
class TrackHolder(view: View, adapter: TrackAdapter) : BaseViewHolder(view) {
|
||||
|
||||
|
@ -133,9 +134,9 @@ class TrackHolder(view: View, adapter: TrackAdapter) : BaseViewHolder(view) {
|
|||
fun enabledTextColor(enabled: Boolean): Int {
|
||||
return binding.root.context.getResourceColor(
|
||||
if (enabled) {
|
||||
android.R.attr.textColorPrimary
|
||||
AR.attr.textColorPrimary
|
||||
} else {
|
||||
android.R.attr.textColorHint
|
||||
AR.attr.textColorHint
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ import eu.kanade.tachiyomi.util.view.expand
|
|||
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
|
||||
import java.text.DateFormat
|
||||
import java.util.*
|
||||
import android.R as AR
|
||||
|
||||
class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
||||
E2EBottomSheetDialog<TrackingBottomSheetBinding>(controller.activity!!),
|
||||
|
@ -381,7 +382,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
|||
hideSearchView()
|
||||
dialog.dismiss()
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
return
|
||||
}
|
||||
|
@ -413,7 +414,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
|||
|
||||
activity.materialAlertDialog()
|
||||
.setTitle(R.string.status)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setSingleChoiceItems(
|
||||
statusString.toTypedArray(),
|
||||
selectedIndex,
|
||||
|
@ -430,7 +431,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
|||
|
||||
val dialog = activity.materialAlertDialog()
|
||||
.setTitle(R.string.remove_tracking)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
|
||||
if (item.service.canRemoveFromService()) {
|
||||
val serviceName = activity.getString(item.service.nameRes())
|
||||
|
@ -473,8 +474,8 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
|||
val dialog = activity.materialAlertDialog()
|
||||
.setTitle(R.string.chapters)
|
||||
.setView(binding.root)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
// Remove focus to update selected number
|
||||
val np = binding.chaptersPicker
|
||||
np.clearFocus()
|
||||
|
@ -507,8 +508,8 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) :
|
|||
val dialog = activity.materialAlertDialog()
|
||||
.setTitle(R.string.score)
|
||||
.setView(binding.root)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
val np = binding.scorePicker
|
||||
np.clearFocus()
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ import kotlinx.coroutines.withContext
|
|||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.concurrent.atomic.*
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import android.R as AR
|
||||
|
||||
class MigrationListController(bundle: Bundle? = null) :
|
||||
BaseLegacyController<MigrationListControllerBinding>(bundle),
|
||||
|
@ -464,7 +465,7 @@ class MigrationListController(bundle: Bundle? = null) :
|
|||
router.popCurrentController()
|
||||
migrationsJob?.cancel()
|
||||
}
|
||||
?.setNegativeButton(android.R.string.cancel, null)?.show()
|
||||
?.setNegativeButton(AR.string.cancel, null)?.show()
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -534,7 +535,7 @@ class MigrationListController(bundle: Bundle? = null) :
|
|||
migrateMangas()
|
||||
}
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
@ -546,7 +547,7 @@ class MigrationListController(bundle: Bundle? = null) :
|
|||
block()
|
||||
migrationsJob?.cancel()
|
||||
}
|
||||
?.setNegativeButton(android.R.string.cancel, null)
|
||||
?.setNegativeButton(AR.string.cancel, null)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
@ -43,6 +43,7 @@ import java.text.DateFormat
|
|||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import android.R as AR
|
||||
|
||||
class AboutController : SettingsLegacyController() {
|
||||
|
||||
|
@ -205,7 +206,7 @@ class AboutController : SettingsLegacyController() {
|
|||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
(dialog?.findViewById(android.R.id.message) as? TextView)?.movementMethod =
|
||||
(dialog?.findViewById(AR.id.message) as? TextView)?.movementMethod =
|
||||
LinkMovementMethod.getInstance()
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ import androidx.core.view.updateLayoutParams
|
|||
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.core.preference.toggle
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.databinding.TachiOverflowLayoutBinding
|
||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
import eu.kanade.tachiyomi.util.lang.addBetaTag
|
||||
|
@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.util.system.dpToPx
|
|||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.openInBrowser
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import android.R as AR
|
||||
|
||||
class OverflowDialog(activity: MainActivity) : Dialog(activity, R.style.OverflowDialogTheme) {
|
||||
|
||||
|
@ -96,7 +97,7 @@ class OverflowDialog(activity: MainActivity) : Dialog(activity, R.style.Overflow
|
|||
|
||||
val vName = "v${BuildConfig.VERSION_NAME}".substringBefore("-")
|
||||
val newVName = buildSpannedString {
|
||||
color(context.getResourceColor(android.R.attr.textColorSecondary)) {
|
||||
color(context.getResourceColor(AR.attr.textColorSecondary)) {
|
||||
append(vName)
|
||||
}
|
||||
if (BuildConfig.BETA) {
|
||||
|
|
|
@ -29,6 +29,7 @@ import eu.kanade.tachiyomi.util.view.compatToolTipText
|
|||
import eu.kanade.tachiyomi.util.view.scrollViewWith
|
||||
import eu.kanade.tachiyomi.util.view.withFadeTransaction
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
class StatsController : BaseLegacyController<StatsControllerBinding>() {
|
||||
|
||||
|
@ -121,7 +122,7 @@ class StatsController : BaseLegacyController<StatsControllerBinding>() {
|
|||
pieData.setDrawValues(false)
|
||||
|
||||
binding.mangaStatsStatusPieChart.apply {
|
||||
setHoleColor(ContextCompat.getColor(context, android.R.color.transparent))
|
||||
setHoleColor(ContextCompat.getColor(context, AR.color.transparent))
|
||||
setDrawEntryLabels(false)
|
||||
setTouchEnabled(false)
|
||||
description.isEnabled = false
|
||||
|
|
|
@ -32,8 +32,9 @@ import eu.kanade.tachiyomi.ui.more.stats.details.StatsDetailsPresenter.StatsSort
|
|||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.isLandscape
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.*
|
||||
import kotlin.math.ceil
|
||||
import android.R as AR
|
||||
|
||||
class StatsDetailsChartLayout @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
@ -222,7 +223,7 @@ class StatsDetailsChartLayout @JvmOverloads constructor(
|
|||
pieData.setDrawValues(false)
|
||||
|
||||
statsPieChart.apply {
|
||||
setHoleColor(ContextCompat.getColor(context, android.R.color.transparent))
|
||||
setHoleColor(ContextCompat.getColor(context, AR.color.transparent))
|
||||
setDrawEntryLabels(false)
|
||||
setTouchEnabled(false)
|
||||
description.isEnabled = false
|
||||
|
|
|
@ -61,6 +61,7 @@ import eu.kanade.tachiyomi.util.view.withFadeTransaction
|
|||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.*
|
||||
import android.R as AR
|
||||
|
||||
class StatsDetailsController :
|
||||
BaseCoroutineController<StatsDetailsControllerBinding, StatsDetailsPresenter>(),
|
||||
|
@ -143,7 +144,7 @@ class StatsDetailsController :
|
|||
highlightedDay = null
|
||||
binding.statsRecyclerView.scrollToPosition(0)
|
||||
}
|
||||
?.setNegativeButton(android.R.string.cancel, null)
|
||||
?.setNegativeButton(AR.string.cancel, null)
|
||||
?.show()
|
||||
}
|
||||
chipSeriesType.setOnClickListener {
|
||||
|
@ -397,8 +398,8 @@ class StatsDetailsController :
|
|||
tempValues.remove(newSelection)
|
||||
}
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
selectedValues.clear()
|
||||
selectedValues.addAll(tempValues)
|
||||
setState(selectedValues, resourceId, resourceIdPlural)
|
||||
|
@ -787,7 +788,7 @@ class StatsDetailsController :
|
|||
resetLayout()
|
||||
updateStats(binding, true)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@ import java.util.*
|
|||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* Activity containing the reader of Tachiyomi. This activity is mostly a container of the
|
||||
|
@ -286,7 +287,7 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
// Setup shared element transitions
|
||||
if (intent.extras?.getString(TRANSITION_NAME) != null) {
|
||||
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
|
||||
findViewById<View>(android.R.id.content)?.let { contentView ->
|
||||
findViewById<View>(AR.id.content)?.let { contentView ->
|
||||
MainActivity.chapterIdToExitTo = 0L
|
||||
contentView.transitionName = intent.extras?.getString(TRANSITION_NAME)
|
||||
visibleChapterRange = intent.extras?.getLongArray(VISIBLE_CHAPTERS) ?: longArrayOf()
|
||||
|
@ -302,7 +303,7 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
super.onCreate(savedInstanceState)
|
||||
binding = ReaderActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
val a = obtainStyledAttributes(intArrayOf(android.R.attr.windowLightStatusBar))
|
||||
val a = obtainStyledAttributes(intArrayOf(AR.attr.windowLightStatusBar))
|
||||
val lightStatusBar = a.getBoolean(0, false)
|
||||
a.recycle()
|
||||
setCutoutMode()
|
||||
|
@ -749,13 +750,13 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
duration = (
|
||||
resources?.getInteger(
|
||||
if (entering) {
|
||||
android.R.integer.config_longAnimTime
|
||||
AR.integer.config_longAnimTime
|
||||
} else {
|
||||
android.R.integer.config_mediumAnimTime
|
||||
AR.integer.config_mediumAnimTime
|
||||
},
|
||||
) ?: 500
|
||||
).toLong()
|
||||
addTarget(android.R.id.content)
|
||||
addTarget(AR.id.content)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1659,10 +1660,10 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
|
|||
|
||||
materialAlertDialog()
|
||||
.setMessage(R.string.use_image_as_cover)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
setAsCover(page)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import eu.kanade.tachiyomi.data.notification.NotificationHandler
|
|||
import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
||||
import eu.kanade.tachiyomi.data.notification.Notifications
|
||||
import eu.kanade.tachiyomi.util.system.notificationManager
|
||||
import java.io.File
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* Class used to show BigPictureStyle notifications
|
||||
|
@ -105,7 +105,7 @@ class SaveImageNotifier(private val context: Context) {
|
|||
with(notificationBuilder) {
|
||||
setContentTitle(context.getString(R.string.download_error))
|
||||
setContentText(error ?: context.getString(R.string.unknown_error))
|
||||
setSmallIcon(android.R.drawable.ic_menu_report_image)
|
||||
setSmallIcon(AR.drawable.ic_menu_report_image)
|
||||
}
|
||||
updateNotification()
|
||||
}
|
||||
|
|
|
@ -7,13 +7,14 @@ import android.graphics.drawable.Drawable
|
|||
import android.view.View
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.isLTR
|
||||
import android.R as AR
|
||||
|
||||
class RecentMangaDivider(context: Context) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {
|
||||
|
||||
private val divider: Drawable
|
||||
|
||||
init {
|
||||
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
|
||||
val a = context.obtainStyledAttributes(intArrayOf(AR.attr.listDivider))
|
||||
divider = a.getDrawable(0)!!
|
||||
a.recycle()
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@ import androidx.core.view.updatePaddingRelative
|
|||
import androidx.transition.TransitionManager
|
||||
import androidx.transition.TransitionSet
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.coil.loadManga
|
||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||
import eu.kanade.tachiyomi.data.database.models.ChapterHistory
|
||||
import eu.kanade.tachiyomi.data.download.model.Download
|
||||
import eu.kanade.tachiyomi.data.coil.loadManga
|
||||
import eu.kanade.tachiyomi.databinding.RecentMangaItemBinding
|
||||
import eu.kanade.tachiyomi.databinding.RecentSubChapterItemBinding
|
||||
import eu.kanade.tachiyomi.ui.download.DownloadButton
|
||||
|
@ -32,8 +32,9 @@ import eu.kanade.tachiyomi.util.system.dpToPx
|
|||
import eu.kanade.tachiyomi.util.system.timeSpanFromNow
|
||||
import eu.kanade.tachiyomi.util.view.setAnimVectorCompat
|
||||
import eu.kanade.tachiyomi.util.view.setCards
|
||||
import java.util.Date
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.*
|
||||
import java.util.concurrent.*
|
||||
import android.R as AR
|
||||
|
||||
class RecentMangaHolder(
|
||||
view: View,
|
||||
|
@ -84,7 +85,7 @@ class RecentMangaHolder(
|
|||
.addTransition(androidx.transition.ChangeBounds())
|
||||
.addTransition(androidx.transition.Slide())
|
||||
transition.duration =
|
||||
itemView.resources.getInteger(android.R.integer.config_shortAnimTime).toLong()
|
||||
itemView.resources.getInteger(AR.integer.config_shortAnimTime).toLong()
|
||||
TransitionManager.beginDelayedTransition(adapter.recyclerView, transition)
|
||||
}
|
||||
updateCards()
|
||||
|
|
|
@ -91,6 +91,7 @@ import kotlinx.coroutines.flow.collectLatest
|
|||
import kotlinx.coroutines.launch
|
||||
import java.util.*
|
||||
import kotlin.math.max
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* Fragment that shows recently read manga.
|
||||
|
@ -812,7 +813,7 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
manga.seriesType(activity),
|
||||
),
|
||||
)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.setPositiveButton(R.string.reset) { dialog, _ ->
|
||||
removeHistory(manga, history, dialog.isPromptChecked)
|
||||
}
|
||||
|
@ -838,7 +839,7 @@ class RecentsController(bundle: Bundle? = null) :
|
|||
val holderId = (holder as? RecentMangaHolder)?.chapterId
|
||||
adapter.notifyItemChanged(position)
|
||||
val transition = TransitionSet().addTransition(androidx.transition.Fade())
|
||||
transition.duration = view!!.resources.getInteger(android.R.integer.config_shortAnimTime)
|
||||
transition.duration = view!!.resources.getInteger(AR.integer.config_shortAnimTime)
|
||||
.toLong()
|
||||
androidx.transition.TransitionManager.beginDelayedTransition(binding.recycler, transition)
|
||||
if (holderId == -1L) return
|
||||
|
|
|
@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.databinding.RecentsHistoryViewBinding
|
|||
import eu.kanade.tachiyomi.util.bindToPreference
|
||||
import eu.kanade.tachiyomi.util.system.materialAlertDialog
|
||||
import eu.kanade.tachiyomi.widget.BaseRecentsDisplayView
|
||||
import android.R as AR
|
||||
|
||||
class RecentsHistoryView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
BaseRecentsDisplayView<RecentsHistoryViewBinding>(context, attrs) {
|
||||
|
@ -24,7 +25,7 @@ class RecentsHistoryView @JvmOverloads constructor(context: Context, attrs: Attr
|
|||
.setPositiveButton(R.string.clear) { _, _ ->
|
||||
controller?.presenter?.deleteAllHistory()
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import eu.kanade.tachiyomi.widget.preference.IntListMatPreference
|
|||
import eu.kanade.tachiyomi.widget.preference.ListMatPreference
|
||||
import eu.kanade.tachiyomi.widget.preference.MultiListMatPreference
|
||||
import eu.kanade.tachiyomi.widget.preference.TriStateListPreference
|
||||
import android.R as AR
|
||||
|
||||
@DslMarker
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
|
@ -107,7 +108,7 @@ fun PreferenceGroup.infoPreference(@StringRes infoRes: Int): Preference {
|
|||
Preference(context),
|
||||
) {
|
||||
iconRes = R.drawable.ic_info_outline_24dp
|
||||
iconTint = context.getResourceColor(android.R.attr.textColorSecondary)
|
||||
iconTint = context.getResourceColor(AR.attr.textColorSecondary)
|
||||
summaryRes = infoRes
|
||||
isSelectable = false
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
|||
import eu.kanade.tachiyomi.util.system.isInNightMode
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import kotlin.math.max
|
||||
import android.R as AR
|
||||
|
||||
class ThemePreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
Preference(context, attrs) {
|
||||
|
@ -239,8 +240,8 @@ class ThemePreference @JvmOverloads constructor(context: Context, attrs: Attribu
|
|||
configuration.uiMode = if (item.isDarkTheme) UI_MODE_NIGHT_YES else UI_MODE_NIGHT_NO
|
||||
val themeContext = context.createConfigurationContext(configuration)
|
||||
themeContext.setTheme(item.theme.styleRes)
|
||||
val primaryText = themeContext.getResourceColor(android.R.attr.textColorPrimary)
|
||||
val secondaryText = themeContext.getResourceColor(android.R.attr.textColorSecondary)
|
||||
val primaryText = themeContext.getResourceColor(AR.attr.textColorPrimary)
|
||||
val secondaryText = themeContext.getResourceColor(AR.attr.textColorSecondary)
|
||||
val background = themeContext.getResourceColor(R.attr.background)
|
||||
val colorSecondary = themeContext.getResourceColor(R.attr.colorSecondary)
|
||||
val appBar = themeContext.getResourceColor(R.attr.colorSurface)
|
||||
|
|
|
@ -81,6 +81,7 @@ import yokai.domain.base.BasePreferences.ExtensionInstaller
|
|||
import yokai.domain.extension.interactor.TrustExtension
|
||||
import yokai.domain.manga.interactor.GetManga
|
||||
import java.io.File
|
||||
import android.R as AR
|
||||
|
||||
class SettingsAdvancedController : SettingsLegacyController() {
|
||||
|
||||
|
@ -175,8 +176,8 @@ class SettingsAdvancedController : SettingsLegacyController() {
|
|||
activity!!.materialAlertDialog()
|
||||
.setTitle(R.string.warning)
|
||||
.setMessage(if (it) R.string.warning_enroll_into_beta else R.string.warning_unenroll_from_beta)
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> isChecked = it }
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(AR.string.ok) { _, _ -> isChecked = it }
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
false
|
||||
} else {
|
||||
|
@ -213,13 +214,13 @@ class SettingsAdvancedController : SettingsLegacyController() {
|
|||
listView.setItemChecked(position, true)
|
||||
}
|
||||
}
|
||||
.setPositiveButton(android.R.string.ok) { dialog, _ ->
|
||||
.setPositiveButton(AR.string.ok) { dialog, _ ->
|
||||
val listView = (dialog as AlertDialog).listView
|
||||
val deleteRead = listView.isItemChecked(1)
|
||||
val deleteNonFavorite = listView.isItemChecked(2)
|
||||
cleanupDownloads(deleteRead, deleteNonFavorite)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show().apply {
|
||||
disableItems(arrayOf(activity!!.getString(R.string.clean_orphaned_downloads)))
|
||||
}
|
||||
|
@ -320,7 +321,7 @@ class SettingsAdvancedController : SettingsLegacyController() {
|
|||
.setPositiveButton(R.string.download) { _, _ ->
|
||||
openInBrowser(ShizukuInstaller.downloadLink)
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
false
|
||||
} else {
|
||||
|
@ -342,11 +343,11 @@ class SettingsAdvancedController : SettingsLegacyController() {
|
|||
onClick {
|
||||
activity?.materialAlertDialog()
|
||||
?.setTitle(R.string.confirm_revoke_all_extensions)
|
||||
?.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
?.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
trustExtension.revokeAll()
|
||||
activity?.toast(R.string.requires_app_restart)
|
||||
}
|
||||
?.setNegativeButton(android.R.string.cancel, null)?.show()
|
||||
?.setNegativeButton(AR.string.cancel, null)?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import eu.kanade.tachiyomi.util.view.scrollViewWith
|
|||
import eu.kanade.tachiyomi.util.view.snack
|
||||
import kotlin.math.max
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
class ClearDatabaseController :
|
||||
BaseCoroutineController<ClearDatabaseControllerBinding, ClearDatabasePresenter>(),
|
||||
|
@ -122,10 +123,10 @@ class ClearDatabaseController :
|
|||
.setMultiChoiceItems(item, selected) { _, which, checked ->
|
||||
selected[which] = checked
|
||||
}
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
clearDatabaseForSelectedSources(selected.last())
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ import kotlinx.coroutines.flow.onEach
|
|||
import uy.kohesive.injekt.injectLazy
|
||||
import yokai.domain.storage.StorageManager
|
||||
import yokai.domain.storage.StoragePreferences
|
||||
import android.R as AR
|
||||
|
||||
@Deprecated("Migrating to compose")
|
||||
class SettingsDataLegacyController : SettingsLegacyController() {
|
||||
|
@ -324,7 +325,7 @@ class SettingsDataLegacyController : SettingsLegacyController() {
|
|||
}
|
||||
createBackup(BackupOptions.fromBooleanArray(booleanArrayList.toBooleanArray()))
|
||||
}
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(AR.string.cancel, null)
|
||||
.show().apply {
|
||||
disableItems(arrayOf(options.first()))
|
||||
}
|
||||
|
@ -366,7 +367,7 @@ class SettingsDataLegacyController : SettingsLegacyController() {
|
|||
activity.materialAlertDialog()
|
||||
.setTitle(R.string.invalid_backup_file)
|
||||
.setMessage(e.message)
|
||||
.setPositiveButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(AR.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,14 @@ import android.graphics.Canvas
|
|||
import android.graphics.Rect
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import android.R as AR
|
||||
|
||||
class SourceDividerItemDecoration(context: Context) : androidx.recyclerview.widget.RecyclerView.ItemDecoration() {
|
||||
|
||||
private val divider: Drawable
|
||||
|
||||
init {
|
||||
val a = context.obtainStyledAttributes(intArrayOf(android.R.attr.listDivider))
|
||||
val a = context.obtainStyledAttributes(intArrayOf(AR.attr.listDivider))
|
||||
divider = a.getDrawable(0)!!
|
||||
a.recycle()
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import eu.kanade.tachiyomi.source.includeLangInName
|
|||
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.view.compatToolTipText
|
||||
import android.R as AR
|
||||
|
||||
class SourceHolder(view: View, val adapter: SourceAdapter) :
|
||||
BaseFlexibleViewHolder(view, adapter) {
|
||||
|
@ -43,7 +44,7 @@ class SourceHolder(view: View, val adapter: SourceAdapter) :
|
|||
if (isPinned) {
|
||||
R.attr.colorSecondary
|
||||
} else {
|
||||
android.R.attr.textColorSecondary
|
||||
AR.attr.textColorSecondary
|
||||
},
|
||||
),
|
||||
)
|
||||
|
|
|
@ -21,6 +21,7 @@ import eu.kanade.tachiyomi.util.view.checkHeightThen
|
|||
import eu.kanade.tachiyomi.util.view.collapse
|
||||
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsetsCompat
|
||||
import eu.kanade.tachiyomi.widget.E2EBottomSheetDialog
|
||||
import android.R as AR
|
||||
|
||||
class SourceFilterSheet(val activity: Activity) :
|
||||
E2EBottomSheetDialog<SourceFilterSheetBinding>(activity) {
|
||||
|
@ -57,7 +58,7 @@ class SourceFilterSheet(val activity: Activity) :
|
|||
}
|
||||
}
|
||||
|
||||
val attrsArray = intArrayOf(android.R.attr.actionBarSize)
|
||||
val attrsArray = intArrayOf(AR.attr.actionBarSize)
|
||||
val array = context.obtainStyledAttributes(attrsArray)
|
||||
val headerHeight = array.getDimensionPixelSize(0, 0)
|
||||
array.recycle()
|
||||
|
@ -130,7 +131,7 @@ class SourceFilterSheet(val activity: Activity) :
|
|||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
val attrsArray = intArrayOf(android.R.attr.actionBarSize)
|
||||
val attrsArray = intArrayOf(AR.attr.actionBarSize)
|
||||
val array = context.obtainStyledAttributes(attrsArray)
|
||||
val headerHeight = array.getDimensionPixelSize(0, 0)
|
||||
binding.titleLayout.updatePaddingRelative(
|
||||
|
|
|
@ -8,15 +8,16 @@ import coil3.imageLoader
|
|||
import coil3.request.CachePolicy
|
||||
import coil3.request.ImageRequest
|
||||
import coil3.request.placeholder
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.coil.CoverViewTarget
|
||||
import eu.kanade.tachiyomi.data.coil.MangaCoverFetcher
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.databinding.SourceGlobalSearchControllerCardItemBinding
|
||||
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.setExtras
|
||||
import eu.kanade.tachiyomi.util.view.makeShapeCorners
|
||||
import eu.kanade.tachiyomi.util.view.setCards
|
||||
import android.R as AR
|
||||
|
||||
class GlobalSearchMangaHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
||||
BaseFlexibleViewHolder(view, adapter) {
|
||||
|
@ -56,7 +57,7 @@ class GlobalSearchMangaHolder(view: View, adapter: GlobalSearchCardAdapter) :
|
|||
binding.itemImage.dispose()
|
||||
if (!manga.thumbnail_url.isNullOrEmpty()) {
|
||||
val request = ImageRequest.Builder(itemView.context).data(manga)
|
||||
.placeholder(android.R.color.transparent)
|
||||
.placeholder(AR.color.transparent)
|
||||
.memoryCachePolicy(CachePolicy.DISABLED)
|
||||
.target(CoverViewTarget(binding.itemImage, binding.progress))
|
||||
.setExtras(MangaCoverFetcher.USE_CUSTOM_COVER_KEY, false)
|
||||
|
|
|
@ -36,6 +36,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
|||
import eu.kanade.tachiyomi.util.system.isInNightMode
|
||||
import eu.kanade.tachiyomi.util.system.setDefaultSettings
|
||||
import eu.kanade.tachiyomi.util.view.setStyle
|
||||
import android.R as AR
|
||||
|
||||
open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
||||
|
||||
|
@ -95,7 +96,7 @@ open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
|||
|
||||
ViewCompat.setOnApplyWindowInsetsListener(content) { v, insets ->
|
||||
// if pure white theme on a device that does not support dark status bar
|
||||
/*if (getResourceColor(android.R.attr.statusBarColor) != Color.TRANSPARENT)
|
||||
/*if (getResourceColor(AR.attr.statusBarColor) != Color.TRANSPARENT)
|
||||
window.statusBarColor = Color.BLACK
|
||||
else window.statusBarColor = getResourceColor(R.attr.colorPrimary)*/
|
||||
window.navigationBarColor = if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
|
@ -179,7 +180,7 @@ open class BaseWebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
|||
setTheme(R.style.ThemeOverlay_Tachiyomi_Amoled)
|
||||
}
|
||||
val themeValue = TypedValue()
|
||||
theme.resolveAttribute(android.R.attr.windowLightStatusBar, themeValue, true)
|
||||
theme.resolveAttribute(AR.attr.windowLightStatusBar, themeValue, true)
|
||||
|
||||
val wic = WindowInsetsControllerCompat(window, window.decorView)
|
||||
wic.isAppearanceLightStatusBars = themeValue.data == -1
|
||||
|
|
|
@ -40,6 +40,7 @@ import eu.kanade.tachiyomi.widget.TriStateCheckBox
|
|||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.util.*
|
||||
import android.R as AR
|
||||
|
||||
fun Manga.isLocal() = source == LocalSource.ID
|
||||
|
||||
|
@ -374,7 +375,7 @@ private fun showAddDuplicateDialog(
|
|||
setNegativeButton(R.string.copy) { mDialog, _ ->
|
||||
migrateManga(mDialog, false)
|
||||
}
|
||||
setNeutralButton(android.R.string.cancel, null)
|
||||
setNeutralButton(AR.string.cancel, null)
|
||||
setCancelable(true)
|
||||
}.show()
|
||||
}
|
||||
|
@ -382,7 +383,7 @@ private fun showAddDuplicateDialog(
|
|||
}
|
||||
dialog.dismiss()
|
||||
}
|
||||
setNegativeButton(activity.getString(android.R.string.cancel)) { _, _ -> }
|
||||
setNegativeButton(activity.getString(AR.string.cancel)) { _, _ -> }
|
||||
setCancelable(true)
|
||||
}.create().apply {
|
||||
setOnShowListener {
|
||||
|
|
|
@ -23,8 +23,9 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
|||
import net.greypanther.natsort.CaseInsensitiveSimpleNaturalComparator
|
||||
import java.net.URI
|
||||
import java.net.URISyntaxException
|
||||
import java.util.Locale
|
||||
import java.util.*
|
||||
import kotlin.math.floor
|
||||
import android.R as AR
|
||||
|
||||
/**
|
||||
* Replaces the given string to have at most [count] characters using [replacement] at its end.
|
||||
|
@ -166,7 +167,7 @@ fun String.withSubtitle(subtitle: Spanned): Spanned =
|
|||
fun String.withSubtitle(context: Context, subtitle: String): Spanned {
|
||||
val spannable = SpannableStringBuilder(this + "\n" + subtitle)
|
||||
spannable.setSpan(
|
||||
ForegroundColorSpan(context.getResourceColor(android.R.attr.textColorSecondary)),
|
||||
ForegroundColorSpan(context.getResourceColor(AR.attr.textColorSecondary)),
|
||||
this.length + 1,
|
||||
spannable.length,
|
||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE,
|
||||
|
|
|
@ -77,6 +77,7 @@ import kotlin.math.max
|
|||
import kotlin.math.pow
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.random.Random
|
||||
import android.R as AR
|
||||
|
||||
fun Controller.setOnQueryTextChangeListener(
|
||||
searchView: SearchView?,
|
||||
|
@ -494,7 +495,7 @@ fun Controller.scrollViewWith(
|
|||
) {
|
||||
if (!recycler.canScrollVertically(-1)) {
|
||||
val shortAnimationDuration = resources?.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
) ?: 0
|
||||
activityBinding?.appBar?.y = 0f
|
||||
activityBinding?.appBar?.updateAppBarAfterY(recycler)
|
||||
|
@ -555,7 +556,7 @@ fun Controller.scrollViewWith(
|
|||
) {
|
||||
val halfWay = activityBinding.appBar.height.toFloat() / 2
|
||||
val shortAnimationDuration = resources?.getInteger(
|
||||
android.R.integer.config_shortAnimTime,
|
||||
AR.integer.config_shortAnimTime,
|
||||
) ?: 0
|
||||
val closerToTop = abs(activityBinding.appBar.y) > halfWay
|
||||
val halfWayBottom = (activityBinding.bottomNav?.height?.toFloat() ?: 0f) / 2
|
||||
|
@ -745,7 +746,7 @@ fun Controller.setAppBarBG(value: Float, includeTabView: Boolean = false) {
|
|||
}
|
||||
if (activityBinding?.appBar?.isInvisible != true) {
|
||||
activity?.window?.statusBarColor =
|
||||
context.getResourceColor(android.R.attr.statusBarColor)
|
||||
context.getResourceColor(AR.attr.statusBarColor)
|
||||
}
|
||||
} else {
|
||||
val color = ColorUtils.blendARGB(
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.google.android.material.button.MaterialButton
|
|||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.databinding.CommonViewEmptyBinding
|
||||
import eu.kanade.tachiyomi.util.view.setVectorCompat
|
||||
import android.R as AR
|
||||
|
||||
class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
RelativeLayout(context, attrs) {
|
||||
|
@ -42,7 +43,7 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
|
|||
* @param textResource text of information view
|
||||
*/
|
||||
fun show(@DrawableRes drawable: Int, message: String, actions: List<Action>? = null) {
|
||||
binding.imageView.setVectorCompat(drawable, android.R.attr.textColorHint)
|
||||
binding.imageView.setVectorCompat(drawable, AR.attr.textColorHint)
|
||||
binding.textLabel.text = message
|
||||
|
||||
binding.actionsContainer.removeAllViews()
|
||||
|
|
|
@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
|||
import eu.kanade.tachiyomi.util.view.setAnimVectorCompat
|
||||
import eu.kanade.tachiyomi.util.view.setVectorCompat
|
||||
import kotlin.math.roundToInt
|
||||
import android.R as AR
|
||||
|
||||
class TriStateCheckBox constructor(context: Context, attrs: AttributeSet?) :
|
||||
FrameLayout(context, attrs) {
|
||||
|
@ -67,7 +68,7 @@ class TriStateCheckBox constructor(context: Context, attrs: AttributeSet?) :
|
|||
)
|
||||
|
||||
private val disabledAlpha = run {
|
||||
val typedArray = context.obtainStyledAttributes(intArrayOf(android.R.attr.disabledAlpha))
|
||||
val typedArray = context.obtainStyledAttributes(intArrayOf(AR.attr.disabledAlpha))
|
||||
val attrValue = typedArray.getFloat(0, 0f)
|
||||
typedArray.recycle()
|
||||
attrValue
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.util.AttributeSet
|
|||
import android.util.TypedValue
|
||||
import com.google.android.material.textview.MaterialTextView
|
||||
import eu.kanade.tachiyomi.R
|
||||
import android.R as AR
|
||||
|
||||
class CustomDialogTitle constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
MaterialTextView(context, attrs) {
|
||||
|
@ -23,8 +24,8 @@ class CustomDialogTitle constructor(context: Context, attrs: AttributeSet? = nul
|
|||
val a = context.obtainStyledAttributes(
|
||||
null,
|
||||
R.styleable.TextAppearance,
|
||||
android.R.attr.textAppearanceMedium,
|
||||
android.R.style.TextAppearance_Medium,
|
||||
AR.attr.textAppearanceMedium,
|
||||
AR.style.TextAppearance_Medium,
|
||||
)
|
||||
a.getDimensionPixelSize(
|
||||
R.styleable.TextAppearance_android_textSize,
|
||||
|
|
|
@ -15,6 +15,7 @@ import androidx.core.view.isVisible
|
|||
import androidx.preference.Preference.SummaryProvider
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.kanade.tachiyomi.R
|
||||
import android.R as AR
|
||||
|
||||
class EditTextResetPreference @JvmOverloads constructor(
|
||||
activity: Activity?,
|
||||
|
@ -31,7 +32,7 @@ class EditTextResetPreference @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
override fun didShow(dialog: DialogInterface) {
|
||||
val textView = (dialog as? AlertDialog)?.findViewById<EditText>(android.R.id.edit) ?: return
|
||||
val textView = (dialog as? AlertDialog)?.findViewById<EditText>(AR.id.edit) ?: return
|
||||
textView.requestFocus()
|
||||
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
|
||||
}
|
||||
|
@ -47,12 +48,12 @@ class EditTextResetPreference @JvmOverloads constructor(
|
|||
|
||||
override fun dialog(): MaterialAlertDialogBuilder {
|
||||
return super.dialog().apply {
|
||||
val attrs = intArrayOf(android.R.attr.dialogLayout)
|
||||
val attrs = intArrayOf(AR.attr.dialogLayout)
|
||||
val a = context.obtainStyledAttributes(R.style.Preference_DialogPreference_EditTextPreference_Material, attrs)
|
||||
val resourceId = a.getResourceId(0, 0)
|
||||
val view = LayoutInflater.from(context).inflate(resourceId, null)
|
||||
val textView = view.findViewById<EditText>(android.R.id.edit)
|
||||
val message = view.findViewById<TextView>(android.R.id.message)
|
||||
val textView = view.findViewById<EditText>(AR.id.edit)
|
||||
val message = view.findViewById<TextView>(AR.id.message)
|
||||
message?.isVisible = dialogSummary != null
|
||||
message?.text = dialogSummary
|
||||
textView?.append(
|
||||
|
@ -75,7 +76,7 @@ class EditTextResetPreference @JvmOverloads constructor(
|
|||
notifyChanged()
|
||||
}
|
||||
}
|
||||
this.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
this.setPositiveButton(AR.string.ok) { _, _ ->
|
||||
if (callChangeListener(textView.text.toString())) {
|
||||
if (preferenceDataStore != null) {
|
||||
if (textView.text.isNullOrBlank()) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
|||
import eu.kanade.tachiyomi.util.system.materialAlertDialog
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import android.R as AR
|
||||
|
||||
open class MatPreference @JvmOverloads constructor(
|
||||
val activity: Activity?,
|
||||
|
@ -96,7 +97,7 @@ open class MatPreference @JvmOverloads constructor(
|
|||
} else if (title != null) {
|
||||
setTitle(title.toString())
|
||||
}
|
||||
setNegativeButton(android.R.string.cancel, null)
|
||||
setNegativeButton(AR.string.cancel, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ import androidx.appcompat.app.AlertDialog
|
|||
import androidx.appcompat.widget.AppCompatCheckedTextView
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.view.children
|
||||
import androidx.preference.Preference.SummaryProvider
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.kanade.tachiyomi.util.system.disableItems
|
||||
import android.R as AR
|
||||
|
||||
class MultiListMatPreference @JvmOverloads constructor(
|
||||
activity: Activity?,
|
||||
|
@ -82,7 +84,7 @@ class MultiListMatPreference @JvmOverloads constructor(
|
|||
if (allSelectionRes != null && !showAllLast) { allValue } else { booleanArrayOf() } +
|
||||
entryValues.map { it in set }.toBooleanArray() +
|
||||
if (allSelectionRes != null && showAllLast) { allValue } else { booleanArrayOf() }
|
||||
setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
setPositiveButton(AR.string.ok) { _, _ ->
|
||||
val pos = mutableListOf<Int>()
|
||||
for (i in items.indices)
|
||||
if (!(allSelectionRes != null && i == allPos) && selected[i]) pos.add(i)
|
||||
|
|
|
@ -12,6 +12,7 @@ import androidx.preference.PreferenceCategory
|
|||
import androidx.preference.PreferenceViewHolder
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import android.R as AR
|
||||
|
||||
class SwitchPreferenceCategory @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
@ -30,7 +31,7 @@ class SwitchPreferenceCategory @JvmOverloads constructor(
|
|||
|
||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||
super.onBindViewHolder(holder)
|
||||
val titleView = holder.findViewById(android.R.id.title) as TextView
|
||||
val titleView = holder.findViewById(AR.id.title) as TextView
|
||||
titleView.setTextColor(context.getResourceColor(R.attr.colorSecondary))
|
||||
syncSwitchView(holder)
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import androidx.preference.PreferenceViewHolder
|
|||
import com.google.android.material.card.MaterialCardView
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import android.R as AR
|
||||
|
||||
class TrackerPreference @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
|
||||
Preference(context, attrs) {
|
||||
|
@ -28,7 +29,7 @@ class TrackerPreference @JvmOverloads constructor(context: Context, attrs: Attri
|
|||
|
||||
logoContainer.setCardBackgroundColor(iconColor)
|
||||
val padding = if (Color.alpha(iconColor) == 0) 0 else 4.dpToPx
|
||||
holder.findViewById(android.R.id.icon).setPadding(padding)
|
||||
holder.findViewById(AR.id.icon).setPadding(padding)
|
||||
checkedIcon.isVisible = !getPersistedString("").isNullOrEmpty()
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,12 @@ import android.content.Context
|
|||
import android.util.AttributeSet
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.text.buildSpannedString
|
||||
import androidx.preference.Preference.SummaryProvider
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.setting.defaultValue
|
||||
import eu.kanade.tachiyomi.util.system.setTriStateItems
|
||||
import eu.kanade.tachiyomi.widget.TriStateCheckBox
|
||||
import android.R as AR
|
||||
|
||||
class TriStateListPreference @JvmOverloads constructor(
|
||||
activity: Activity?,
|
||||
|
@ -114,7 +115,7 @@ class TriStateListPreference @JvmOverloads constructor(
|
|||
if (allSelectionRes != null && showAllLast) { allValue } else { intArrayOf() }
|
||||
var includedItems = set
|
||||
var excludedItems = excludedSet
|
||||
setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
setPositiveButton(AR.string.ok) { _, _ ->
|
||||
sharedPreferences?.edit {
|
||||
putStringSet(key, includedItems)
|
||||
excludeKey?.let { putStringSet(it, excludedItems) }
|
||||
|
|
|
@ -23,6 +23,7 @@ import androidx.compose.ui.res.stringResource
|
|||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import kotlinx.coroutines.launch
|
||||
import android.R as AR
|
||||
|
||||
|
||||
@Composable
|
||||
|
@ -83,12 +84,12 @@ fun EditTextPreferenceWidget(
|
|||
}
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(AR.string.ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
@ -25,6 +25,7 @@ import androidx.compose.ui.draw.clip
|
|||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import android.R as AR
|
||||
|
||||
|
||||
@Composable
|
||||
|
@ -73,7 +74,7 @@ fun <T> ListPreferenceWidget(
|
|||
},
|
||||
confirmButton = {
|
||||
TextButton(onClick = { isDialogShown = false }) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
@ -14,6 +14,7 @@ import androidx.compose.ui.res.stringResource
|
|||
import androidx.compose.ui.window.DialogProperties
|
||||
import yokai.presentation.component.LabeledCheckbox
|
||||
import yokai.presentation.component.preference.Preference
|
||||
import android.R as AR
|
||||
|
||||
@Composable
|
||||
fun MultiSelectListPreferenceWidget(
|
||||
|
@ -69,12 +70,12 @@ fun MultiSelectListPreferenceWidget(
|
|||
isDialogShown = false
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(AR.string.ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = { isDialogShown = false }) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
@ -30,6 +30,7 @@ import androidx.compose.ui.draw.clip
|
|||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.tachiyomi.R
|
||||
import android.R as AR
|
||||
|
||||
private enum class State {
|
||||
CHECKED, INVERSED, UNCHECKED
|
||||
|
@ -120,7 +121,7 @@ fun <T> TriStateListDialog(
|
|||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
confirmButton = {
|
||||
|
@ -135,7 +136,7 @@ fun <T> TriStateListDialog(
|
|||
onValueChanged(included, excluded)
|
||||
},
|
||||
) {
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
Text(text = stringResource(AR.string.ok))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
|
|
@ -39,6 +39,7 @@ import yokai.presentation.component.EmptyScreen
|
|||
import yokai.presentation.component.ToolTipButton
|
||||
import yokai.presentation.extension.repo.component.ExtensionRepoInput
|
||||
import yokai.presentation.extension.repo.component.ExtensionRepoItem
|
||||
import android.R as AR
|
||||
|
||||
@Composable
|
||||
fun ExtensionRepoScreen(
|
||||
|
@ -163,7 +164,7 @@ fun ExtensionRepoReplacePrompt(
|
|||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
title = {
|
||||
|
|
|
@ -23,6 +23,7 @@ import eu.kanade.tachiyomi.data.backup.models.Backup
|
|||
import eu.kanade.tachiyomi.data.backup.restore.BackupRestoreJob
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import yokai.presentation.component.LabeledCheckbox
|
||||
import android.R as AR
|
||||
|
||||
@Composable
|
||||
fun RestoreBackup(
|
||||
|
@ -64,7 +65,7 @@ fun RestoreBackup(
|
|||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
title = { Text(text = stringResource(R.string.restore_backup)) },
|
||||
|
@ -75,7 +76,7 @@ fun RestoreBackup(
|
|||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
Text(text = stringResource(AR.string.cancel))
|
||||
}
|
||||
},
|
||||
title = { Text(text = stringResource(R.string.invalid_backup_file)) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue