Big refactoring of strings

Removing some of the unused, removing the prefixes on some strings
Cleaning up some of the unused resoures and dialogs
This commit is contained in:
Jay 2020-04-08 20:32:36 -04:00
parent 4828f934b5
commit fb529f52d3
181 changed files with 9961 additions and 10949 deletions

View File

@ -5,8 +5,8 @@
android:icon="@drawable/sc_update_48dp" android:icon="@drawable/sc_update_48dp"
android:shortcutDisabledMessage="@string/app_not_available" android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_recently_updated" android:shortcutId="show_recently_updated"
android:shortcutLongLabel="@string/label_recent_updates" android:shortcutLongLabel="@string/recent_updates"
android:shortcutShortLabel="@string/short_recent_updates"> android:shortcutShortLabel="@string/updates">
<intent <intent
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED" android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
android:targetPackage="${applicationId}" android:targetPackage="${applicationId}"
@ -29,8 +29,8 @@
android:icon="@drawable/sc_extensions_48dp" android:icon="@drawable/sc_extensions_48dp"
android:shortcutDisabledMessage="@string/app_not_available" android:shortcutDisabledMessage="@string/app_not_available"
android:shortcutId="show_extensions" android:shortcutId="show_extensions"
android:shortcutLongLabel="@string/label_extensions" android:shortcutLongLabel="@string/extensions"
android:shortcutShortLabel="@string/label_extensions"> android:shortcutShortLabel="@string/extensions">
<intent <intent
android:action="eu.kanade.tachiyomi.EXTENSIONS" android:action="eu.kanade.tachiyomi.EXTENSIONS"
android:targetPackage="${applicationId}" android:targetPackage="${applicationId}"

View File

@ -302,7 +302,7 @@ class BackupRestoreService : Service() {
} }
} else { } else {
errors.add("${manga.title} - ${service?.name} not logged in") errors.add("${manga.title} - ${service?.name} not logged in")
val notLoggedIn = getString(R.string.not_logged_into, service?.name) val notLoggedIn = getString(R.string.not_logged_into_, service?.name)
trackingErrors.add(notLoggedIn) trackingErrors.add(notLoggedIn)
} }
} }
@ -361,7 +361,7 @@ class BackupRestoreService : Service() {
private fun showProgressNotification(current: Int, total: Int, title: String) { private fun showProgressNotification(current: Int, total: Int, title: String) {
notificationManager.notify(Notifications.ID_RESTORE_PROGRESS, progressNotification notificationManager.notify(Notifications.ID_RESTORE_PROGRESS, progressNotification
.setContentTitle(title.chop(30)) .setContentTitle(title.chop(30))
.setContentText(getString(R.string.backup_restoring_progress, restoreProgress, .setContentText(getString(R.string.restoring_progress, restoreProgress,
totalAmount)) totalAmount))
.setProgress(total, current, false) .setProgress(total, current, false)
.build()) .build())
@ -387,7 +387,7 @@ class BackupRestoreService : Service() {
content.add(trackingErrorsString) content.add(trackingErrorsString)
} }
if (cancelled > 0) if (cancelled > 0)
content.add(getString(R.string.restore_completed_content_2, cancelled)) content.add(getString(R.string.restore_content_skipped, cancelled))
val restoreString = content.joinToString("\n") val restoreString = content.joinToString("\n")
@ -400,7 +400,7 @@ class BackupRestoreService : Service() {
.setColor(ContextCompat.getColor(this, R.color.colorAccent)) .setColor(ContextCompat.getColor(this, R.color.colorAccent))
if (errors.size > 0 && !path.isNullOrEmpty() && !file.isNullOrEmpty()) { if (errors.size > 0 && !path.isNullOrEmpty() && !file.isNullOrEmpty()) {
resultNotification.addAction(R.drawable.ic_clear_grey_24dp_img, getString(R.string resultNotification.addAction(R.drawable.ic_clear_grey_24dp_img, getString(R.string
.notification_action_error_log), getErrorLogIntent(path, file)) .view_all_errors), getErrorLogIntent(path, file))
} }
notificationManager.notify(Notifications.ID_RESTORE_COMPLETE, resultNotification.build()) notificationManager.notify(Notifications.ID_RESTORE_COMPLETE, resultNotification.build())
} }

View File

@ -42,12 +42,12 @@ interface Category : Serializable {
fun sortRes(): Int = when (mangaSort) { fun sortRes(): Int = when (mangaSort) {
ALPHA_ASC, ALPHA_DSC -> R.string.title ALPHA_ASC, ALPHA_DSC -> R.string.title
UPDATED_ASC, UPDATED_DSC -> R.string.action_sort_latest_chapter UPDATED_ASC, UPDATED_DSC -> R.string.latest_chapter
UNREAD_ASC, UNREAD_DSC -> R.string.action_filter_unread UNREAD_ASC, UNREAD_DSC -> R.string.unread
LAST_READ_ASC, LAST_READ_DSC -> R.string.action_sort_last_read LAST_READ_ASC, LAST_READ_DSC -> R.string.last_read
TOTAL_ASC, TOTAL_DSC -> R.string.action_sort_total TOTAL_ASC, TOTAL_DSC -> R.string.total_chapters
DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.action_date_added DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.date_added
else -> R.string.action_sort_drag_and_drop else -> R.string.drag_and_drop
} }
fun catSortingMode(): Int? = when (mangaSort) { fun catSortingMode(): Int? = when (mangaSort) {
@ -92,7 +92,7 @@ interface Category : Serializable {
} }
fun createDefault(context: Context): Category = fun createDefault(context: Context): Category =
create(context.getString(R.string.default_columns)).apply { create(context.getString(R.string.default_value)).apply {
id = 0 id = 0
isFirst = true isFirst = true
} }

View File

@ -1,5 +1,7 @@
package eu.kanade.tachiyomi.data.database.models package eu.kanade.tachiyomi.data.database.models
import android.content.Context
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.source.SourceManager import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.ui.reader.ReaderActivity
@ -45,6 +47,16 @@ interface Manga : SManga {
fun showChapterTitle(defaultShow: Boolean): Boolean = chapter_flags and DISPLAY_MASK == DISPLAY_NUMBER fun showChapterTitle(defaultShow: Boolean): Boolean = chapter_flags and DISPLAY_MASK == DISPLAY_NUMBER
fun mangaType(context: Context): String {
return context.getString(when (mangaType()) {
TYPE_WEBTOON -> R.string.webtoon
TYPE_MANHWA -> R.string.manhwa
TYPE_MANHUA -> R.string.manhua
TYPE_COMIC -> R.string.comic
else -> R.string.manga
})
}
/** /**
* The type of comic the manga is (ie. manga, manhwa, manhua) * The type of comic the manga is (ie. manga, manhwa, manhua)
*/ */

View File

@ -79,7 +79,7 @@ internal class DownloadNotifier(private val context: Context) {
isDownloading = true isDownloading = true
// Pause action // Pause action
addAction(R.drawable.ic_av_pause_grey_24dp_img, addAction(R.drawable.ic_av_pause_grey_24dp_img,
context.getString(R.string.action_pause), context.getString(R.string.pause),
NotificationReceiver.pauseDownloadsPendingBroadcast(context)) NotificationReceiver.pauseDownloadsPendingBroadcast(context))
} }
@ -90,12 +90,12 @@ internal class DownloadNotifier(private val context: Context) {
.toRegex(RegexOption.IGNORE_CASE), "") .toRegex(RegexOption.IGNORE_CASE), "")
setContentTitle("$title - $chapter".chop(30)) setContentTitle("$title - $chapter".chop(30))
setContentText( setContentText(
context.getString(R.string.chapter_downloading) context.getString(R.string.downloading)
) )
} else { } else {
setContentTitle( setContentTitle(
context.getString( context.getString(
R.string.chapter_downloading R.string.downloading
) )
) )
setContentText(null) setContentText(null)
@ -125,7 +125,7 @@ internal class DownloadNotifier(private val context: Context) {
isDownloading = true isDownloading = true
// Pause action // Pause action
addAction(R.drawable.ic_av_pause_grey_24dp_img, addAction(R.drawable.ic_av_pause_grey_24dp_img,
context.getString(R.string.action_pause), context.getString(R.string.pause),
NotificationReceiver.pauseDownloadsPendingBroadcast(context)) NotificationReceiver.pauseDownloadsPendingBroadcast(context))
} }
@ -133,7 +133,7 @@ internal class DownloadNotifier(private val context: Context) {
val quotedTitle = Pattern.quote(title) val quotedTitle = Pattern.quote(title)
val chapter = download.chapter.name.replaceFirst("$quotedTitle[\\s]*[-]*[\\s]*".toRegex(RegexOption.IGNORE_CASE), "") val chapter = download.chapter.name.replaceFirst("$quotedTitle[\\s]*[-]*[\\s]*".toRegex(RegexOption.IGNORE_CASE), "")
setContentTitle("$title - $chapter".chop(30)) setContentTitle("$title - $chapter".chop(30))
setContentText(context.getString(R.string.chapter_downloading_progress) setContentText(context.getString(R.string.downloading_progress)
.format(download.downloadedImages, download.pages!!.size)) .format(download.downloadedImages, download.pages!!.size))
setStyle(null) setStyle(null)
setProgress(download.pages!!.size, download.downloadedImages, false) setProgress(download.pages!!.size, download.downloadedImages, false)
@ -147,8 +147,8 @@ internal class DownloadNotifier(private val context: Context) {
*/ */
fun onDownloadPaused() { fun onDownloadPaused() {
with(notification) { with(notification) {
setContentTitle(context.getString(R.string.chapter_paused)) setContentTitle(context.getString(R.string.paused))
setContentText(context.getString(R.string.download_notifier_download_paused)) setContentText(context.getString(R.string.download_paused))
setSmallIcon(R.drawable.ic_av_pause_grey_24dp_img) setSmallIcon(R.drawable.ic_av_pause_grey_24dp_img)
setAutoCancel(false) setAutoCancel(false)
setProgress(0, 0, false) setProgress(0, 0, false)
@ -158,13 +158,13 @@ internal class DownloadNotifier(private val context: Context) {
// Resume action // Resume action
addAction( addAction(
R.drawable.ic_av_play_arrow_grey_img, R.drawable.ic_av_play_arrow_grey_img,
context.getString(R.string.action_resume), context.getString(R.string.resume),
NotificationReceiver.resumeDownloadsPendingBroadcast(context) NotificationReceiver.resumeDownloadsPendingBroadcast(context)
) )
// Clear action // Clear action
addAction( addAction(
R.drawable.ic_clear_grey_24dp_img, R.drawable.ic_clear_grey_24dp_img,
context.getString(R.string.action_cancel_all), context.getString(R.string.cancel_all),
NotificationReceiver.clearDownloadsPendingBroadcast(context) NotificationReceiver.clearDownloadsPendingBroadcast(context)
) )
} }
@ -183,7 +183,7 @@ internal class DownloadNotifier(private val context: Context) {
*/ */
fun onWarning(reason: String) { fun onWarning(reason: String) {
with(notification) { with(notification) {
setContentTitle(context.getString(R.string.download_notifier_downloader_title)) setContentTitle(context.getString(R.string.downloads))
setContentText(reason) setContentText(reason)
setSmallIcon(android.R.drawable.stat_sys_warning) setSmallIcon(android.R.drawable.stat_sys_warning)
setAutoCancel(true) setAutoCancel(true)
@ -207,9 +207,9 @@ internal class DownloadNotifier(private val context: Context) {
fun onError(error: String? = null, chapter: String? = null) { fun onError(error: String? = null, chapter: String? = null) {
// Create notification // Create notification
with(notification) { with(notification) {
setContentTitle(chapter ?: context.getString(R.string.download_notifier_downloader_title)) setContentTitle(chapter ?: context.getString(R.string.download_error))
setContentText(error ?: context.getString(R.string.download_notifier_unkown_error)) setContentText(error ?: context.getString(R.string.could_not_download_unexpected_error))
setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.download_notifier_unkown_error))) setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.could_not_download_unexpected_error)))
setSmallIcon(android.R.drawable.stat_sys_warning) setSmallIcon(android.R.drawable.stat_sys_warning)
setCategory(NotificationCompat.CATEGORY_ERROR) setCategory(NotificationCompat.CATEGORY_ERROR)
clearActions() clearActions()

View File

@ -52,7 +52,7 @@ class DownloadProvider(private val context: Context) {
return downloadsDir.createDirectory(getSourceDirName(source)) return downloadsDir.createDirectory(getSourceDirName(source))
.createDirectory(getMangaDirName(manga)) .createDirectory(getMangaDirName(manga))
} catch (e: NullPointerException) { } catch (e: NullPointerException) {
throw Exception(context.getString(R.string.invalid_download_dir)) throw Exception(context.getString(R.string.invalid_download_location))
} }
} }

View File

@ -163,7 +163,7 @@ class DownloadService : Service() {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ state -> onNetworkStateChanged(state) .subscribe({ state -> onNetworkStateChanged(state)
}, { }, {
toast(R.string.download_queue_error) toast(R.string.could_not_download_chapter_can_try_again)
stopSelf() stopSelf()
}) })
} }
@ -177,14 +177,14 @@ class DownloadService : Service() {
when (connectivity.state) { when (connectivity.state) {
CONNECTED -> { CONNECTED -> {
if (preferences.downloadOnlyOverWifi() && connectivityManager.isActiveNetworkMetered) { if (preferences.downloadOnlyOverWifi() && connectivityManager.isActiveNetworkMetered) {
downloadManager.stopDownloads(getString(R.string.download_notifier_text_only_wifi)) downloadManager.stopDownloads(getString(R.string.no_wifi_connection))
} else { } else {
val started = downloadManager.startDownloads() val started = downloadManager.startDownloads()
if (!started) stopSelf() if (!started) stopSelf()
} }
} }
DISCONNECTED -> { DISCONNECTED -> {
downloadManager.stopDownloads(getString(R.string.download_notifier_no_network)) downloadManager.stopDownloads(getString(R.string.no_network_connection))
} }
else -> { /* Do nothing */ } else -> { /* Do nothing */ }
} }
@ -218,7 +218,7 @@ class DownloadService : Service() {
private fun getPlaceholderNotification(): Notification { private fun getPlaceholderNotification(): Notification {
return NotificationCompat.Builder(this, Notifications.CHANNEL_DOWNLOADER) return NotificationCompat.Builder(this, Notifications.CHANNEL_DOWNLOADER)
.setContentTitle(getString(R.string.download_notifier_downloader_title)) .setContentTitle(getString(R.string.downloading))
.build() .build()
} }
} }

View File

@ -571,14 +571,14 @@ class LibraryUpdateService(
) )
) )
addAction( addAction(
R.drawable.ic_glasses_black_24dp, getString(R.string.action_mark_as_read), R.drawable.ic_glasses_black_24dp, getString(R.string.mark_as_read),
NotificationReceiver.markAsReadPendingBroadcast( NotificationReceiver.markAsReadPendingBroadcast(
this@LibraryUpdateService, this@LibraryUpdateService,
manga, chapters, Notifications.ID_NEW_CHAPTERS manga, chapters, Notifications.ID_NEW_CHAPTERS
) )
) )
addAction( addAction(
R.drawable.ic_book_white_24dp, getString(R.string.action_view_chapters), R.drawable.ic_book_white_24dp, getString(R.string.view_chapters),
NotificationReceiver.openChapterPendingActivity( NotificationReceiver.openChapterPendingActivity(
this@LibraryUpdateService, this@LibraryUpdateService,
manga, Notifications.ID_NEW_CHAPTERS manga, Notifications.ID_NEW_CHAPTERS
@ -595,13 +595,13 @@ class LibraryUpdateService(
notification(Notifications.CHANNEL_NEW_CHAPTERS) { notification(Notifications.CHANNEL_NEW_CHAPTERS) {
setSmallIcon(R.drawable.ic_tachi) setSmallIcon(R.drawable.ic_tachi)
setLargeIcon(notificationBitmap) setLargeIcon(notificationBitmap)
setContentTitle(getString(R.string.notification_new_chapters)) setContentTitle(getString(R.string.new_chapters_found))
color = ContextCompat.getColor(applicationContext, R.color.colorAccent) color = ContextCompat.getColor(applicationContext, R.color.colorAccent)
if (updates.size > 1) { if (updates.size > 1) {
setContentText( setContentText(
resources.getQuantityString( resources.getQuantityString(
R.plurals R.plurals
.notification_new_chapters_text, .for_n_titles,
updates.size, updates.size updates.size, updates.size
) )
) )

View File

@ -133,7 +133,7 @@ class NotificationReceiver : BroadcastReceiver() {
} }
context.startActivity(intent) context.startActivity(intent)
} else { } else {
context.toast(context.getString(R.string.no_next_chapter)) context.toast(context.getString(R.string.next_chapter_not_found))
} }
} }

View File

@ -60,31 +60,31 @@ object Notifications {
val channels = listOf(NotificationChannel( val channels = listOf(NotificationChannel(
CHANNEL_COMMON, CHANNEL_COMMON,
context.getString(R.string.channel_common), context.getString(R.string.common),
NotificationManager.IMPORTANCE_LOW NotificationManager.IMPORTANCE_LOW
), NotificationChannel( ), NotificationChannel(
CHANNEL_LIBRARY, CHANNEL_LIBRARY,
context.getString(R.string.channel_library_updates), context.getString(R.string.updating_library),
NotificationManager.IMPORTANCE_LOW NotificationManager.IMPORTANCE_LOW
).apply { ).apply {
setShowBadge(false) setShowBadge(false)
}, NotificationChannel( }, NotificationChannel(
CHANNEL_DOWNLOADER, CHANNEL_DOWNLOADER,
context.getString(R.string.channel_downloader), context.getString(R.string.downloads),
NotificationManager.IMPORTANCE_LOW NotificationManager.IMPORTANCE_LOW
).apply { ).apply {
setShowBadge(false) setShowBadge(false)
}, NotificationChannel( }, NotificationChannel(
CHANNEL_UPDATES_TO_EXTS, CHANNEL_UPDATES_TO_EXTS,
context.getString(R.string.channel_ext_updates), context.getString(R.string.extension_updates),
NotificationManager.IMPORTANCE_DEFAULT NotificationManager.IMPORTANCE_DEFAULT
), NotificationChannel( ), NotificationChannel(
CHANNEL_NEW_CHAPTERS, CHANNEL_NEW_CHAPTERS,
context.getString(R.string.channel_new_chapters), context.getString(R.string.new_chapters),
NotificationManager.IMPORTANCE_DEFAULT NotificationManager.IMPORTANCE_DEFAULT
), NotificationChannel( ), NotificationChannel(
CHANNEL_RESTORE, CHANNEL_RESTORE,
context.getString(R.string.channel_backup_restore), context.getString(R.string.restoring_backup),
NotificationManager.IMPORTANCE_LOW NotificationManager.IMPORTANCE_LOW
).apply { ).apply {
setShowBadge(false) setShowBadge(false)

View File

@ -47,7 +47,7 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) {
PAUSED -> getString(R.string.paused) PAUSED -> getString(R.string.paused)
DROPPED -> getString(R.string.dropped) DROPPED -> getString(R.string.dropped)
PLANNING -> getString(R.string.plan_to_read) PLANNING -> getString(R.string.plan_to_read)
REPEATING -> getString(R.string.repeating) REPEATING -> getString(R.string.rereading)
else -> "" else -> ""
} }
} }

View File

@ -36,7 +36,7 @@ class Shikimori(private val context: Context, id: Int) : TrackService(id) {
ON_HOLD -> getString(R.string.on_hold) ON_HOLD -> getString(R.string.on_hold)
DROPPED -> getString(R.string.dropped) DROPPED -> getString(R.string.dropped)
PLANNING -> getString(R.string.plan_to_read) PLANNING -> getString(R.string.plan_to_read)
REPEATING -> getString(R.string.repeating) REPEATING -> getString(R.string.rereading)
else -> "" else -> ""
} }
} }

View File

@ -29,13 +29,13 @@ class UpdaterJob : Job() {
NotificationCompat.Builder(context, Notifications.CHANNEL_COMMON).update { NotificationCompat.Builder(context, Notifications.CHANNEL_COMMON).update {
setContentTitle(context.getString(R.string.app_name)) setContentTitle(context.getString(R.string.app_name))
setContentText(context.getString(R.string.update_check_notification_update_available)) setContentText(context.getString(R.string.update_available))
setSmallIcon(android.R.drawable.stat_sys_download_done) setSmallIcon(android.R.drawable.stat_sys_download_done)
color = ContextCompat.getColor(context, R.color.colorAccent) color = ContextCompat.getColor(context, R.color.colorAccent)
// Download action // Download action
addAction( addAction(
android.R.drawable.stat_sys_download_done, android.R.drawable.stat_sys_download_done,
context.getString(R.string.action_download), context.getString(R.string.download),
PendingIntent.getService( PendingIntent.getService(
context, context,
0, 0,

View File

@ -41,7 +41,7 @@ internal class UpdaterNotifier(private val context: Context) {
fun onDownloadStarted(title: String) { fun onDownloadStarted(title: String) {
with(notification) { with(notification) {
setContentTitle(title) setContentTitle(title)
setContentText(context.getString(R.string.update_check_notification_download_in_progress)) setContentText(context.getString(R.string.downloading))
setSmallIcon(android.R.drawable.stat_sys_download) setSmallIcon(android.R.drawable.stat_sys_download)
setOngoing(true) setOngoing(true)
} }
@ -68,18 +68,18 @@ internal class UpdaterNotifier(private val context: Context) {
*/ */
fun onDownloadFinished(uri: Uri) { fun onDownloadFinished(uri: Uri) {
with(notification) { with(notification) {
setContentText(context.getString(R.string.update_check_notification_download_complete)) setContentText(context.getString(R.string.download_complete))
setSmallIcon(android.R.drawable.stat_sys_download_done) setSmallIcon(android.R.drawable.stat_sys_download_done)
setOnlyAlertOnce(false) setOnlyAlertOnce(false)
setProgress(0, 0, false) setProgress(0, 0, false)
// Install action // Install action
setContentIntent(NotificationHandler.installApkPendingActivity(context, uri)) setContentIntent(NotificationHandler.installApkPendingActivity(context, uri))
addAction(R.drawable.ic_system_update_grey_24dp_img, addAction(R.drawable.ic_system_update_grey_24dp_img,
context.getString(R.string.action_install), context.getString(R.string.install),
NotificationHandler.installApkPendingActivity(context, uri)) NotificationHandler.installApkPendingActivity(context, uri))
// Cancel action // Cancel action
addAction(R.drawable.ic_clear_grey_24dp_img, addAction(R.drawable.ic_clear_grey_24dp_img,
context.getString(R.string.action_cancel), context.getString(R.string.cancel),
NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER)) NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER))
} }
notification.show() notification.show()
@ -92,18 +92,18 @@ internal class UpdaterNotifier(private val context: Context) {
*/ */
fun onDownloadError(url: String) { fun onDownloadError(url: String) {
with(notification) { with(notification) {
setContentText(context.getString(R.string.update_check_notification_download_error)) setContentText(context.getString(R.string.download_error))
setSmallIcon(android.R.drawable.stat_sys_warning) setSmallIcon(android.R.drawable.stat_sys_warning)
setOnlyAlertOnce(false) setOnlyAlertOnce(false)
setProgress(0, 0, false) setProgress(0, 0, false)
color = ContextCompat.getColor(context, R.color.colorAccent) color = ContextCompat.getColor(context, R.color.colorAccent)
// Retry action // Retry action
addAction(R.drawable.ic_refresh_grey_24dp_img, addAction(R.drawable.ic_refresh_grey_24dp_img,
context.getString(R.string.action_retry), context.getString(R.string.retry),
UpdaterService.downloadApkPendingService(context, url)) UpdaterService.downloadApkPendingService(context, url))
// Cancel action // Cancel action
addAction(R.drawable.ic_clear_grey_24dp_img, addAction(R.drawable.ic_clear_grey_24dp_img,
context.getString(R.string.action_cancel), context.getString(R.string.cancel),
NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER)) NotificationReceiver.dismissNotificationPendingBroadcast(context, Notifications.ID_UPDATER))
} }
notification.show(Notifications.ID_UPDATER) notification.show(Notifications.ID_UPDATER)

View File

@ -32,7 +32,7 @@ class ExtensionUpdateJob : Job() {
context.notification(Notifications.CHANNEL_UPDATES_TO_EXTS) { context.notification(Notifications.CHANNEL_UPDATES_TO_EXTS) {
setContentTitle( setContentTitle(
context.resources.getQuantityString( context.resources.getQuantityString(
R.plurals.update_check_notification_ext_updates, names R.plurals.extension_update_available, names
.size, names.size .size, names.size
) )
) )

View File

@ -158,10 +158,10 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
if (!cloudflareBypassed) { if (!cloudflareBypassed) {
// Prompt user to update WebView if it seems too outdated // Prompt user to update WebView if it seems too outdated
if (isWebviewOutdated) { if (isWebviewOutdated) {
context.toast(R.string.information_webview_outdated, Toast.LENGTH_LONG) context.toast(R.string.please_update_webview, Toast.LENGTH_LONG)
} }
throw Exception(context.getString(R.string.information_cloudflare_bypass_failure)) throw Exception(context.getString(R.string.failed_to_bypass_cloudflare))
} }
} }

View File

@ -63,11 +63,11 @@ class LocalSource(private val context: Context) : CatalogueSource {
} }
override val id = ID override val id = ID
override val name = context.getString(R.string.local_source) override val name = context.getString(R.string.local_manga)
override val lang = "" override val lang = ""
override val supportsLatest = true override val supportsLatest = true
override fun toString() = context.getString(R.string.local_source) override fun toString() = context.getString(R.string.local_manga)
override fun fetchPopularManga(page: Int) = fetchSearchManga(page, "", POPULAR_FILTERS) override fun fetchPopularManga(page: Int) = fetchSearchManga(page, "", POPULAR_FILTERS)

View File

@ -68,7 +68,7 @@ open class SourceManager(private val context: Context) {
} }
private fun getSourceNotInstalledException(): Exception { private fun getSourceNotInstalledException(): Exception {
return SourceNotFoundException(context.getString(R.string.source_not_installed, id return SourceNotFoundException(context.getString(R.string.source_not_installed_, id
.toString()), id) .toString()), id)
} }

View File

@ -91,8 +91,8 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
*/ */
override fun getTitle(): String? { override fun getTitle(): String? {
return if (showingExtenions) return if (showingExtenions)
applicationContext?.getString(R.string.label_extensions) applicationContext?.getString(R.string.extensions)
else applicationContext?.getString(R.string.pref_category_sources) else applicationContext?.getString(R.string.sources)
} }
/** /**
@ -312,7 +312,7 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
val searchView = searchItem.actionView as SearchView val searchView = searchItem.actionView as SearchView
// Change hint to show global search. // Change hint to show global search.
searchView.queryHint = applicationContext?.getString(R.string.action_global_search_hint) searchView.queryHint = applicationContext?.getString(R.string.global_search)
// Create query listener which opens the global search view. // Create query listener which opens the global search view.
setOnQueryTextChangeListener(searchView, true) { setOnQueryTextChangeListener(searchView, true) {

View File

@ -382,7 +382,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
snack?.dismiss() snack?.dismiss()
val message = if (error is NoResultsException) catalogue_view.context.getString(R.string.no_results_found) else (error.message ?: "") val message = if (error is NoResultsException) catalogue_view.context.getString(R.string.no_results_found) else (error.message ?: "")
snack = catalouge_layout?.snack(message, Snackbar.LENGTH_INDEFINITE) { snack = catalouge_layout?.snack(message, Snackbar.LENGTH_INDEFINITE) {
setAction(R.string.action_retry) { setAction(R.string.retry) {
// If not the first page, show bottom progress bar. // If not the first page, show bottom progress bar.
if (adapter.mainItemCount > 0) { if (adapter.mainItemCount > 0) {
val item = progressItem ?: return@setAction val item = progressItem ?: return@setAction
@ -511,8 +511,8 @@ open class BrowseCatalogueController(bundle: Bundle) :
if (manga.favorite) { if (manga.favorite) {
presenter.changeMangaFavorite(manga) presenter.changeMangaFavorite(manga)
adapter?.notifyItemChanged(position) adapter?.notifyItemChanged(position)
snack = catalouge_layout?.snack(R.string.manga_removed_library, Snackbar.LENGTH_INDEFINITE) { snack = catalouge_layout?.snack(R.string.removed_from_library, Snackbar.LENGTH_INDEFINITE) {
setAction(R.string.action_undo) { setAction(R.string.undo) {
if (!manga.favorite) addManga(manga, position) if (!manga.favorite) addManga(manga, position)
} }
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() { addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
@ -525,7 +525,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
(activity as? MainActivity)?.setUndoSnackBar(snack) (activity as? MainActivity)?.setUndoSnackBar(snack)
} else { } else {
addManga(manga, position) addManga(manga, position)
snack = catalouge_layout?.snack(R.string.manga_added_library) snack = catalouge_layout?.snack(R.string.added_to_library)
} }
} }

View File

@ -45,7 +45,7 @@ class CatalogueSearchSheet(activity: Activity) :
init { init {
val view = activity.layoutInflater.inflate(R.layout.catalogue_drawer_content, null) val view = activity.layoutInflater.inflate(R.layout.catalogue_drawer_content, null)
setContentView(view) setContentView(view)
toolbar_title.text = context.getString(R.string.source_search_options) toolbar_title.text = context.getString(R.string.search_filters)
dismiss_button.setOnClickListener { dismiss() } dismiss_button.setOnClickListener { dismiss() }
reset_btn.setOnClickListener { onResetClicked() } reset_btn.setOnClickListener { onResetClicked() }
/*view.search_layout.setOnApplyWindowInsetsListener { v, insets -> /*view.search_layout.setOnApplyWindowInsetsListener { v, insets ->

View File

@ -47,7 +47,7 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
* Returns the toolbar title to show when this controller is attached. * Returns the toolbar title to show when this controller is attached.
*/ */
override fun getTitle(): String? { override fun getTitle(): String? {
return resources?.getString(R.string.action_edit_categories) return resources?.getString(R.string.edit_categories)
} }
/** /**
@ -107,11 +107,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
*/ */
fun setCategories(categories: List<CategoryItem>) { fun setCategories(categories: List<CategoryItem>) {
adapter?.updateDataSet(categories) adapter?.updateDataSet(categories)
if (categories.isNotEmpty()) {
empty_view.hide()
} else {
empty_view.show(R.drawable.ic_shape_black_128dp, R.string.information_empty_category)
}
} }
/** /**
@ -136,7 +131,7 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
MaterialDialog(activity!!) MaterialDialog(activity!!)
.title(R.string.confirm_category_deletion) .title(R.string.confirm_category_deletion)
.message(R.string.confirm_category_deletion_message) .message(R.string.confirm_category_deletion_message)
.positiveButton(R.string.action_delete) { .positiveButton(R.string.delete) {
deleteCategory(position) deleteCategory(position)
} }
.negativeButton(android.R.string.no) .negativeButton(android.R.string.no)
@ -146,9 +141,9 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
private fun deleteCategory(position: Int) { private fun deleteCategory(position: Int) {
adapter?.removeItem(position) adapter?.removeItem(position)
snack = snack =
view?.snack(R.string.snack_category_deleted, Snackbar.LENGTH_INDEFINITE) { view?.snack(R.string.category_deleted, Snackbar.LENGTH_INDEFINITE) {
var undoing = false var undoing = false
setAction(R.string.action_undo) { setAction(R.string.undo) {
adapter?.restoreDeletedItems() adapter?.restoreDeletedItems()
undoing = true undoing = true
} }
@ -212,6 +207,6 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
* Called from the presenter when a category with the given name already exists. * Called from the presenter when a category with the given name already exists.
*/ */
fun onCategoryExistsError() { fun onCategoryExistsError() {
activity?.toast(R.string.error_category_exists) activity?.toast(R.string.category_with_name_exists)
} }
} }

View File

@ -26,7 +26,7 @@ class CategoryCreateDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
*/ */
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.action_add_category) .title(R.string.add_category)
.positiveButton(android.R.string.ok) .positiveButton(android.R.string.ok)
.negativeButton(android.R.string.cancel) .negativeButton(android.R.string.cancel)
.input(hintRes = R.string.name) { _, input -> .input(hintRes = R.string.name) { _, input ->

View File

@ -36,7 +36,7 @@ class CategoryRenameDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
*/ */
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.action_rename_category) .title(R.string.rename_category)
.negativeButton(android.R.string.cancel) .negativeButton(android.R.string.cancel)
.input(hintRes = R.string.name, prefill = currentName) { _, input -> .input(hintRes = R.string.name, prefill = currentName) { _, input ->
currentName = input.toString() currentName = input.toString()

View File

@ -85,7 +85,7 @@ class DownloadBottomSheet @JvmOverloads constructor(
private fun updateDLTitle() { private fun updateDLTitle() {
val extCount = presenter.downloadQueue.firstOrNull() val extCount = presenter.downloadQueue.firstOrNull()
title_text.text = if (extCount != null) resources.getString( title_text.text = if (extCount != null) resources.getString(
R.string.downloading_x, extCount.chapter.name R.string.downloading_, extCount.chapter.name
) )
else "" else ""
} }
@ -155,7 +155,7 @@ class DownloadBottomSheet @JvmOverloads constructor(
if (presenter.downloadQueue.isEmpty()) { if (presenter.downloadQueue.isEmpty()) {
empty_view?.show( empty_view?.show(
R.drawable.ic_file_download_black_128dp, R.drawable.ic_file_download_black_128dp,
R.string.nothing_downloading) R.string.nothing_is_downloading)
} else { } else {
empty_view?.hide() empty_view?.hide()
} }

View File

@ -90,7 +90,7 @@ class ExtensionBottomPresenter(
.sortedBy { it.pkgName } .sortedBy { it.pkgName }
if (installedSorted.isNotEmpty() || untrustedSorted.isNotEmpty()) { if (installedSorted.isNotEmpty() || untrustedSorted.isNotEmpty()) {
val header = ExtensionGroupItem(context.getString(R.string.ext_installed), installedSorted.size + untrustedSorted.size) val header = ExtensionGroupItem(context.getString(R.string.installed), installedSorted.size + untrustedSorted.size)
items += installedSorted.map { extension -> items += installedSorted.map { extension ->
ExtensionItem(extension, header, currentDownloads[extension.pkgName]) ExtensionItem(extension, header, currentDownloads[extension.pkgName])
} }

View File

@ -91,7 +91,7 @@ ExtensionAdapter.OnButtonClickListener,
fun updateExtTitle() { fun updateExtTitle() {
val extCount = presenter.getExtensionUpdateCount() val extCount = presenter.getExtensionUpdateCount()
title_text.text = if (extCount == 0) context.getString(R.string.label_extensions) title_text.text = if (extCount == 0) context.getString(R.string.extensions)
else resources.getQuantityString(R.plurals.extensions_updates_available, extCount, else resources.getQuantityString(R.plurals.extensions_updates_available, extCount,
extCount) extCount)

View File

@ -63,7 +63,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
} }
override fun getTitle(): String? { override fun getTitle(): String? {
return resources?.getString(R.string.label_extension_info) return resources?.getString(R.string.extension_info)
} }
@SuppressLint("PrivateResource") @SuppressLint("PrivateResource")
@ -75,8 +75,8 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
val context = view.context val context = view.context
extension_title.text = extension.name extension_title.text = extension.name
extension_version.text = context.getString(R.string.ext_version_info, extension.versionName) extension_version.text = context.getString(R.string.version_, extension.versionName)
extension_lang.text = context.getString(R.string.ext_language_info, LocaleHelper.getDisplayName(extension.lang, context)) extension_lang.text = context.getString(R.string.language_, LocaleHelper.getDisplayName(extension.lang, context))
extension_pkg.text = extension.pkgName extension_pkg.text = extension.pkgName
extension.getApplicationIcon(context)?.let { extension_icon.setImageDrawable(it) } extension.getApplicationIcon(context)?.let { extension_icon.setImageDrawable(it) }
extension_uninstall_button.clicks().subscribeUntilDestroy { extension_uninstall_button.clicks().subscribeUntilDestroy {
@ -112,7 +112,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
if (screen.preferenceCount == 0) { if (screen.preferenceCount == 0) {
extension_prefs_empty_view.show(R.drawable.ic_no_settings, extension_prefs_empty_view.show(R.drawable.ic_no_settings,
R.string.ext_empty_preferences) R.string.empty_preferences_for_extension)
} }
} }

View File

@ -43,7 +43,7 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
lang.text = if (extension !is Extension.Untrusted) { lang.text = if (extension !is Extension.Untrusted) {
LocaleHelper.getDisplayName(extension.lang, itemView.context) LocaleHelper.getDisplayName(extension.lang, itemView.context)
} else { } else {
itemView.context.getString(R.string.ext_untrusted).toUpperCase() itemView.context.getString(R.string.untrusted).toUpperCase()
} }
GlideApp.with(itemView.context).clear(edit_button) GlideApp.with(itemView.context).clear(edit_button)
@ -71,11 +71,11 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
val installStep = item.installStep val installStep = item.installStep
if (installStep != null) { if (installStep != null) {
setText(when (installStep) { setText(when (installStep) {
InstallStep.Pending -> R.string.ext_pending InstallStep.Pending -> R.string.pending
InstallStep.Downloading -> R.string.ext_downloading InstallStep.Downloading -> R.string.downloading
InstallStep.Installing -> R.string.ext_installing InstallStep.Installing -> R.string.installing
InstallStep.Installed -> R.string.ext_installed InstallStep.Installed -> R.string.installed
InstallStep.Error -> R.string.action_retry InstallStep.Error -> R.string.retry
}) })
if (installStep != InstallStep.Error) { if (installStep != InstallStep.Error) {
isEnabled = false isEnabled = false
@ -88,22 +88,22 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
backgroundTintList = ColorStateList.valueOf( backgroundTintList = ColorStateList.valueOf(
context.getResourceColor(R.attr.colorAccent)) context.getResourceColor(R.attr.colorAccent))
strokeColor = ColorStateList.valueOf(Color.TRANSPARENT) strokeColor = ColorStateList.valueOf(Color.TRANSPARENT)
setText(R.string.ext_update) setText(R.string.update)
} }
extension.isObsolete -> { extension.isObsolete -> {
// Red outline // Red outline
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error)) setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
setText(R.string.ext_obsolete) setText(R.string.obsolete)
} }
else -> { else -> {
setText(R.string.ext_details) setText(R.string.details)
} }
} }
} else if (extension is Extension.Untrusted) { } else if (extension is Extension.Untrusted) {
setText(R.string.ext_trust) setText(R.string.trust)
} else { } else {
setText(R.string.ext_install) setText(R.string.install)
} }
} }
} }

View File

@ -21,10 +21,10 @@ class ExtensionTrustDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.untrusted_extension) .title(R.string.untrusted_extension)
.message(R.string.untrusted_extension_message) .message(R.string.untrusted_extension_message)
.positiveButton(R.string.ext_trust) { .positiveButton(R.string.trust) {
listener.trustSignature(args.getString(SIGNATURE_KEY)!!) listener.trustSignature(args.getString(SIGNATURE_KEY)!!)
} }
.negativeButton(R.string.ext_uninstall) { .negativeButton(R.string.uninstall) {
listener.uninstallExtension(args.getString(PKGNAME_KEY)!!) listener.uninstallExtension(args.getString(PKGNAME_KEY)!!)
} }
} }

View File

@ -15,7 +15,7 @@ import uy.kohesive.injekt.api.get
class SettingsExtensionsController : SettingsController() { class SettingsExtensionsController : SettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.action_filter titleRes = R.string.filter
val activeLangs = preferences.enabledLanguages().getOrDefault() val activeLangs = preferences.enabledLanguages().getOrDefault()

View File

@ -34,7 +34,7 @@ class ChangeMangaCategoriesDialog<T>(bundle: Bundle? = null) :
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.action_move_category) .title(R.string.move_to_categories)
.listItemsMultiChoice( .listItemsMultiChoice(
items = categories.map { it.name }, items = categories.map { it.name },
initialSelection = preselected.toIntArray(), initialSelection = preselected.toIntArray(),

View File

@ -35,7 +35,7 @@ class LibraryBadge @JvmOverloads constructor(context: Context, attrs: AttributeS
with(download_text) { with(download_text) {
visibility = if (downloads == -2 || downloads > 0) View.VISIBLE else View.GONE visibility = if (downloads == -2 || downloads > 0) View.VISIBLE else View.GONE
text = if (downloads == -2) text = if (downloads == -2)
resources.getString(R.string.local_source_badge) resources.getString(R.string.local)
else downloads.toString() else downloads.toString()
} }

View File

@ -171,7 +171,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) :
} else { } else {
val category = db.getCategoriesForManga(iFlexible.manga) val category = db.getCategoriesForManga(iFlexible.manga)
.executeAsBlocking().firstOrNull()?.name .executeAsBlocking().firstOrNull()?.name
category ?: recyclerView.context.getString(R.string.default_columns) category ?: recyclerView.context.getString(R.string.default_value)
} }
} }
LibrarySort.LAST_READ -> { LibrarySort.LAST_READ -> {
@ -184,7 +184,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) :
LibrarySort.UNREAD -> { LibrarySort.UNREAD -> {
val unread = iFlexible.manga.unread val unread = iFlexible.manga.unread
if (unread > 0) getRange(unread) if (unread > 0) getRange(unread)
else recyclerView.context.getString(R.string.action_filter_read) else recyclerView.context.getString(R.string.read)
} }
LibrarySort.TOTAL -> { LibrarySort.TOTAL -> {
val total = iFlexible.chapterCount val total = iFlexible.chapterCount

View File

@ -142,8 +142,8 @@ class LibraryController(
override fun getTitle(): String? { override fun getTitle(): String? {
return if (view != null && presenter.categories.size > 1) presenter.categories.find { return if (view != null && presenter.categories.size > 1) presenter.categories.find {
it.order == activeCategory it.order == activeCategory
}?.name ?: view?.context?.getString(R.string.label_library) }?.name ?: view?.context?.getString(R.string.library)
else view?.context?.getString(R.string.label_library) else view?.context?.getString(R.string.library)
} }
private var scrollListener = object : RecyclerView.OnScrollListener() { private var scrollListener = object : RecyclerView.OnScrollListener() {
@ -290,7 +290,7 @@ class LibraryController(
0 -> updateLibrary(presenter.allCategories.first()) 0 -> updateLibrary(presenter.allCategories.first())
else -> updateLibrary() else -> updateLibrary()
} }
}).positiveButton(R.string.action_update).show() }).positiveButton(R.string.update).show()
} }
else -> { else -> {
when (preferences.updateOnRefresh().getOrDefault()) { when (preferences.updateOnRefresh().getOrDefault()) {
@ -437,8 +437,8 @@ class LibraryController(
} else { } else {
empty_view?.show( empty_view?.show(
R.drawable.ic_book_black_128dp, R.drawable.ic_book_black_128dp,
if (bottom_sheet.hasActiveFilters()) R.string.information_empty_library_filtered if (bottom_sheet.hasActiveFilters()) R.string.no_matches_for_filters
else R.string.information_empty_library else R.string.library_is_empty_add_from_browse
) )
} }
adapter.setItems(mangaMap) adapter.setItems(mangaMap)
@ -731,10 +731,10 @@ class LibraryController(
presenter.moveMangaToCategory(manga, category.id, mangaIds) presenter.moveMangaToCategory(manga, category.id, mangaIds)
snack?.dismiss() snack?.dismiss()
snack = view?.snack( snack = view?.snack(
resources!!.getString(R.string.moved_to_category, category.name) resources!!.getString(R.string.moved_to_, category.name)
) { ) {
anchorView = bottom_sheet anchorView = bottom_sheet
setAction(R.string.action_undo) { setAction(R.string.undo) {
manga.category = category.id!! manga.category = category.id!!
presenter.moveMangaToCategory(manga, oldCatId, mangaIds) presenter.moveMangaToCategory(manga, oldCatId, mangaIds)
} }
@ -748,9 +748,9 @@ class LibraryController(
snack = view?.snack( snack = view?.snack(
resources!!.getString( resources!!.getString(
when { when {
inQueue -> R.string.category_already_in_queue inQueue -> R.string._already_in_queue
LibraryUpdateService.isRunning() -> R.string.adding_category_to_queue LibraryUpdateService.isRunning() -> R.string.adding_category_to_queue
else -> R.string.updating_category_x else -> R.string.updating_
}, category.name }, category.name
), Snackbar.LENGTH_LONG ), Snackbar.LENGTH_LONG
) { ) {
@ -869,18 +869,9 @@ class LibraryController(
override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean { override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {
val count = selectedMangas.size val count = selectedMangas.size
if (count == 0) {
// Destroy action mode if there are no items selected. // Destroy action mode if there are no items selected.
destroyActionModeIfNeeded() if (count == 0) destroyActionModeIfNeeded()
} else { else mode.title = resources?.getString(R.string.selected_, count)
mode.title = resources?.getString(R.string.label_selected, count)
if (preferences.librarySortingMode().getOrDefault() == LibrarySort.DRAG_AND_DROP) {
val catId = (selectedMangas.first() as? LibraryManga)?.category
val sameCat = /*(adapter?.categories?.getOrNull(library_pager.currentItem)?.id
== catId) &&*/ selectedMangas.all { (it as? LibraryManga)?.category == catId }
menu.findItem(R.id.action_move_manga).isVisible = sameCat
} else menu.findItem(R.id.action_move_manga).isVisible = false
}
return false return false
} }
//endregion //endregion
@ -889,8 +880,8 @@ class LibraryController(
when (item.itemId) { when (item.itemId) {
R.id.action_move_to_category -> showChangeMangaCategoriesDialog() R.id.action_move_to_category -> showChangeMangaCategoriesDialog()
R.id.action_delete -> { R.id.action_delete -> {
MaterialDialog(activity!!).message(R.string.confirm_manga_deletion) MaterialDialog(activity!!).message(R.string.remove_from_library_question)
.positiveButton(R.string.action_remove) { .positiveButton(R.string.remove) {
deleteMangasFromLibrary() deleteMangasFromLibrary()
}.negativeButton(android.R.string.no).show() }.negativeButton(android.R.string.no).show()
} }
@ -918,11 +909,11 @@ class LibraryController(
destroyActionModeIfNeeded() destroyActionModeIfNeeded()
snack?.dismiss() snack?.dismiss()
snack = view?.snack( snack = view?.snack(
activity?.getString(R.string.manga_removed_library) ?: "", Snackbar.LENGTH_INDEFINITE activity?.getString(R.string.removed_from_library) ?: "", Snackbar.LENGTH_INDEFINITE
) { ) {
anchorView = bottom_sheet anchorView = bottom_sheet
var undoing = false var undoing = false
setAction(R.string.action_undo) { setAction(R.string.undo) {
presenter.addMangas(mangas) presenter.addMangas(mangas)
undoing = true undoing = true
} }

View File

@ -105,16 +105,16 @@ class LibraryHeaderItem(
sortText.text = itemView.context.getString(R.string.sort_by_, sortText.text = itemView.context.getString(R.string.sort_by_,
itemView.context.getString( itemView.context.getString(
when (category.sortingMode()) { when (category.sortingMode()) {
LibrarySort.LATEST_CHAPTER -> R.string.action_sort_latest_chapter LibrarySort.LATEST_CHAPTER -> R.string.latest_chapter
LibrarySort.DRAG_AND_DROP -> LibrarySort.DRAG_AND_DROP ->
if (category.id == -1) R.string.category if (category.id == -1) R.string.category
else R.string.action_sort_drag_and_drop else R.string.drag_and_drop
LibrarySort.TOTAL -> R.string.action_sort_total LibrarySort.TOTAL -> R.string.total_chapters
LibrarySort.UNREAD -> R.string.action_filter_unread LibrarySort.UNREAD -> R.string.unread
LibrarySort.LAST_READ -> R.string.action_sort_last_read LibrarySort.LAST_READ -> R.string.last_read
LibrarySort.ALPHA -> R.string.title LibrarySort.ALPHA -> R.string.title
LibrarySort.DATE_ADDED -> R.string.action_date_added LibrarySort.DATE_ADDED -> R.string.date_added
else -> R.string.action_sort_drag_and_drop else -> R.string.drag_and_drop
} }
)) ))

View File

@ -516,7 +516,7 @@ class LibraryPresenter(
categories.add(0, createDefaultCategory()) categories.add(0, createDefaultCategory())
if (categories.size == 1 && showCategories) if (categories.size == 1 && showCategories)
categories.first().name = context.getString(R.string.label_library) categories.first().name = context.getString(R.string.library)
this.allCategories = categories this.allCategories = categories
this.categories = if (!showCategories) arrayListOf(categoryAll) this.categories = if (!showCategories) arrayListOf(categoryAll)

View File

@ -177,17 +177,17 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
} }
downloaded = inflate(R.layout.filter_buttons) as FilterTagGroup downloaded = inflate(R.layout.filter_buttons) as FilterTagGroup
downloaded.setup(this, R.string.action_filter_downloaded, R.string.action_filter_not_downloaded) downloaded.setup(this, R.string.downloaded, R.string.not_downloaded)
completed = inflate(R.layout.filter_buttons) as FilterTagGroup completed = inflate(R.layout.filter_buttons) as FilterTagGroup
completed.setup(this, R.string.completed, R.string.ongoing) completed.setup(this, R.string.completed, R.string.ongoing)
unread = inflate(R.layout.filter_buttons) as FilterTagGroup unread = inflate(R.layout.filter_buttons) as FilterTagGroup
unread.setup(this, R.string.action_filter_not_started, R.string.action_filter_in_progress, unread.setup(this, R.string.not_started, R.string.in_progress,
R.string.action_filter_read) R.string.read)
tracked = inflate(R.layout.filter_buttons) as FilterTagGroup tracked = inflate(R.layout.filter_buttons) as FilterTagGroup
tracked.setup(this, R.string.action_filter_tracked, R.string.action_filter_not_tracked) tracked.setup(this, R.string.tracked, R.string.not_tracked)
reSortViews() reSortViews()

View File

@ -18,10 +18,10 @@ class ChooseShapeDialog(bundle: Bundle? = null) : DialogController(bundle) {
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val modes = intArrayOf( val modes = intArrayOf(
R.string.circular_icon, R.string.circular,
R.string.rounded_icon, R.string.rounded,
R.string.square_icon, R.string.square,
R.string.star_icon) R.string.star)
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.icon_shape) .title(R.string.icon_shape)

View File

@ -48,7 +48,7 @@ class EditMangaDialog : DialogController {
val dialog = MaterialDialog(activity!!).apply { val dialog = MaterialDialog(activity!!).apply {
customView(viewRes = R.layout.edit_manga_dialog, scrollable = true) customView(viewRes = R.layout.edit_manga_dialog, scrollable = true)
negativeButton(android.R.string.cancel) negativeButton(android.R.string.cancel)
positiveButton(R.string.action_save) { onPositiveButtonClick() } positiveButton(R.string.save) { onPositiveButtonClick() }
} }
dialogView = dialog.view dialogView = dialog.view
onViewCreated(dialog.view) onViewCreated(dialog.view)

View File

@ -115,6 +115,7 @@ import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import java.io.File import java.io.File
import java.io.IOException import java.io.IOException
import java.util.Locale
import kotlin.math.abs import kotlin.math.abs
import kotlin.math.max import kotlin.math.max
@ -581,7 +582,7 @@ class MangaDetailsController : BaseController,
val popup = PopupMenu(itemView.context, itemView) val popup = PopupMenu(itemView.context, itemView)
// Inflate our menu resource into the PopupMenu's Menu // Inflate our menu resource into the PopupMenu's Menu
popup.menuInflater.inflate(R.menu.chapters_mat_single, popup.menu) popup.menuInflater.inflate(R.menu.chapter_single, popup.menu)
popup.setOnMenuItemClickListener { menuItem -> popup.setOnMenuItemClickListener { menuItem ->
val chapters = listOf(item) val chapters = listOf(item)
@ -614,7 +615,7 @@ class MangaDetailsController : BaseController,
if (bookmarked) R.string.removed_bookmark if (bookmarked) R.string.removed_bookmark
else R.string.bookmarked, Snackbar.LENGTH_INDEFINITE else R.string.bookmarked, Snackbar.LENGTH_INDEFINITE
) { ) {
setAction(R.string.action_undo) { setAction(R.string.undo) {
bookmarkChapters(listOf(item), bookmarked) bookmarkChapters(listOf(item), bookmarked)
} }
} }
@ -634,7 +635,7 @@ class MangaDetailsController : BaseController,
else R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE else R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE
) { ) {
var undoing = false var undoing = false
setAction(R.string.action_undo) { setAction(R.string.undo) {
presenter.markChaptersRead(listOf(item), read, true, lastRead, pagesLeft) presenter.markChaptersRead(listOf(item), read, true, lastRead, pagesLeft)
undoing = true undoing = true
} }
@ -681,7 +682,7 @@ class MangaDetailsController : BaseController,
val editItem = menu.findItem(R.id.action_edit) val editItem = menu.findItem(R.id.action_edit)
editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch
editItem.title = view?.context?.getString(if (manga?.source == LocalSource.ID) editItem.title = view?.context?.getString(if (manga?.source == LocalSource.ID)
R.string.action_edit else R.string.action_edit_cover) R.string.edit else R.string.edit_cover)
menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch && menu.findItem(R.id.action_download).isVisible = !presenter.isLockedFromSearch &&
manga?.source != LocalSource.ID manga?.source != LocalSource.ID
menu.findItem(R.id.action_add_to_home_screen).isVisible = !presenter.isLockedFromSearch menu.findItem(R.id.action_add_to_home_screen).isVisible = !presenter.isLockedFromSearch
@ -697,7 +698,7 @@ class MangaDetailsController : BaseController,
val searchItem = menu.findItem(R.id.action_search) val searchItem = menu.findItem(R.id.action_search)
val searchView = searchItem.actionView as SearchView val searchView = searchItem.actionView as SearchView
searchView.queryHint = resources?.getString(R.string.chapter_search_hint) searchView.queryHint = resources?.getString(R.string.search_chapters)
searchItem.icon?.mutate()?.setTint(iconPrimary) searchItem.icon?.mutate()?.setTint(iconPrimary)
searchItem.collapseActionView() searchItem.collapseActionView()
if (query.isNotEmpty()) { if (query.isNotEmpty()) {
@ -731,9 +732,9 @@ class MangaDetailsController : BaseController,
if (manga?.hasCustomCover() == true) { if (manga?.hasCustomCover() == true) {
MaterialDialog(activity!!).listItems(items = listOf( MaterialDialog(activity!!).listItems(items = listOf(
view!!.context.getString( view!!.context.getString(
R.string.action_edit_cover R.string.edit_cover
), view!!.context.getString( ), view!!.context.getString(
R.string.action_reset_cover R.string.reset_cover
) )
), waitForPositiveButton = false, selection = { _, index, _ -> ), waitForPositiveButton = false, selection = { _, index, _ ->
when (index) { when (index) {
@ -751,8 +752,8 @@ class MangaDetailsController : BaseController,
R.id.action_add_to_home_screen -> addToHomeScreen() R.id.action_add_to_home_screen -> addToHomeScreen()
R.id.action_refresh_tracking -> presenter.refreshTrackers() R.id.action_refresh_tracking -> presenter.refreshTrackers()
R.id.action_mark_all_as_read -> { R.id.action_mark_all_as_read -> {
MaterialDialog(view!!.context).message(R.string.mark_all_as_read_message) MaterialDialog(view!!.context).message(R.string.mark_all_chapters_as_read)
.positiveButton(R.string.action_mark_as_read) { .positiveButton(R.string.mark_as_read) {
markAsRead(presenter.chapters) markAsRead(presenter.chapters)
}.negativeButton(android.R.string.cancel).show() }.negativeButton(android.R.string.cancel).show()
} }
@ -803,7 +804,7 @@ class MangaDetailsController : BaseController,
clipData = ClipData.newRawUri(null, stream) clipData = ClipData.newRawUri(null, stream)
} }
} }
startActivity(Intent.createChooser(intent, context.getString(R.string.action_share))) startActivity(Intent.createChooser(intent, context.getString(R.string.share)))
} catch (e: Exception) { } catch (e: Exception) {
context.toast(e.message) context.toast(e.message)
} }
@ -847,12 +848,14 @@ class MangaDetailsController : BaseController,
} }
private fun downloadChapters(chapters: List<ChapterItem>) { private fun downloadChapters(chapters: List<ChapterItem>) {
val view = view val view = view ?: return
presenter.downloadChapters(chapters) presenter.downloadChapters(chapters)
if (view != null && !presenter.manga.favorite && (snack == null || val text = view.context.getString(R.string.add_x_to_library, presenter.manga.mangaType
snack?.getText() != view.context.getString(R.string.snack_add_to_library))) { (view.context).toLowerCase(Locale.ROOT))
snack = view.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) { if (!presenter.manga.favorite && (snack == null ||
setAction(R.string.action_add) { snack?.getText() != text)) {
snack = view.snack(text, Snackbar.LENGTH_INDEFINITE) {
setAction(R.string.add) {
presenter.setFavorite(true) presenter.setFavorite(true)
} }
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() { addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
@ -906,7 +909,7 @@ class MangaDetailsController : BaseController,
override fun onLoadCleared(placeholder: Drawable?) { } override fun onLoadCleared(placeholder: Drawable?) { }
override fun onLoadFailed(errorDrawable: Drawable?) { override fun onLoadFailed(errorDrawable: Drawable?) {
activity?.toast(R.string.icon_creation_fail) activity?.toast(R.string.could_not_create_shortcut)
} }
}) })
} }
@ -973,8 +976,8 @@ class MangaDetailsController : BaseController,
if (item != null) { if (item != null) {
openChapter(item.chapter) openChapter(item.chapter)
} else if (snack == null || snack?.getText() != view?.context?.getString( } else if (snack == null || snack?.getText() != view?.context?.getString(
R.string.no_next_chapter)) { R.string.next_chapter_not_found)) {
snack = view?.snack(R.string.no_next_chapter, Snackbar.LENGTH_LONG) { snack = view?.snack(R.string.next_chapter_not_found, Snackbar.LENGTH_LONG) {
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() { addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
override fun onDismissed(transientBottomBar: Snackbar?, event: Int) { override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
super.onDismissed(transientBottomBar, event) super.onDismissed(transientBottomBar, event)
@ -1091,17 +1094,17 @@ class MangaDetailsController : BaseController,
private fun showAddedSnack() { private fun showAddedSnack() {
val view = view ?: return val view = view ?: return
snack?.dismiss() snack?.dismiss()
snack = view.snack(view.context.getString(R.string.manga_added_library)) snack = view.snack(view.context.getString(R.string.added_to_library))
} }
private fun showRemovedSnack() { private fun showRemovedSnack() {
val view = view ?: return val view = view ?: return
snack?.dismiss() snack?.dismiss()
snack = view.snack( snack = view.snack(
view.context.getString(R.string.manga_removed_library), view.context.getString(R.string.removed_from_library),
Snackbar.LENGTH_INDEFINITE Snackbar.LENGTH_INDEFINITE
) { ) {
setAction(R.string.action_undo) { setAction(R.string.undo) {
presenter.setFavorite(true) presenter.setFavorite(true)
} }
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() { addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
@ -1139,7 +1142,7 @@ class MangaDetailsController : BaseController,
val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
clipboard.setPrimaryClip(ClipData.newPlainText(contentType, content)) clipboard.setPrimaryClip(ClipData.newPlainText(contentType, content))
snack = view.snack(view.context.getString(R.string.copied_to_clipboard, contentType)) snack = view.snack(view.context.getString(R.string._copied_to_clipboard, contentType))
} }
override fun handleBack(): Boolean { override fun handleBack(): Boolean {
@ -1254,7 +1257,7 @@ class MangaDetailsController : BaseController,
override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean { override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean {
mode?.title = view?.context?.getString(if (startingDLChapterPos == null) mode?.title = view?.context?.getString(if (startingDLChapterPos == null)
R.string.select_start_chapter else R.string.select_end_chapter) R.string.select_starting_chapter else R.string.select_ending_chapter)
return false return false
} }
@ -1264,11 +1267,11 @@ class MangaDetailsController : BaseController,
intent.type = "image/*" intent.type = "image/*"
startActivityForResult( startActivityForResult(
Intent.createChooser(intent, Intent.createChooser(intent,
resources?.getString(R.string.file_select_cover)), resources?.getString(R.string.select_cover_image)),
101 101
) )
} else { } else {
activity?.toast(R.string.notification_first_add_to_library) activity?.toast(R.string.must_be_in_library_to_edit)
} }
} }
@ -1284,7 +1287,7 @@ class MangaDetailsController : BaseController,
setPaletteColor() setPaletteColor()
} }
} catch (error: IOException) { } catch (error: IOException) {
activity.toast(R.string.notification_cover_update_failed) activity.toast(R.string.failed_to_update_cover)
Timber.e(error) Timber.e(error)
} }
} }

View File

@ -549,10 +549,10 @@ class MangaDetailsPresenter(
fun currentFilters(): String { fun currentFilters(): String {
val filtersId = mutableListOf<Int?>() val filtersId = mutableListOf<Int?>()
filtersId.add(if (onlyRead()) R.string.action_filter_read else null) filtersId.add(if (onlyRead()) R.string.read else null)
filtersId.add(if (onlyUnread()) R.string.action_filter_unread else null) filtersId.add(if (onlyUnread()) R.string.unread else null)
filtersId.add(if (onlyDownloaded()) R.string.action_filter_downloaded else null) filtersId.add(if (onlyDownloaded()) R.string.downloaded else null)
filtersId.add(if (onlyBookmarked()) R.string.action_filter_bookmarked else null) filtersId.add(if (onlyBookmarked()) R.string.bookmarked else null)
return filtersId.filterNotNull().joinToString(", ") { preferences.context.getString(it) } return filtersId.filterNotNull().joinToString(", ") { preferences.context.getString(it) }
} }

View File

@ -76,11 +76,11 @@ class MangaHeaderHolder(
true true
} }
manga_full_title.setOnLongClickListener { manga_full_title.setOnLongClickListener {
adapter.delegate.copyToClipboard(manga_full_title.text.toString(), R.string.manga_info_full_title_label) adapter.delegate.copyToClipboard(manga_full_title.text.toString(), R.string.title)
true true
} }
manga_author.setOnLongClickListener { manga_author.setOnLongClickListener {
adapter.delegate.copyToClipboard(manga_author.text.toString(), R.string.manga_info_author_label) adapter.delegate.copyToClipboard(manga_author.text.toString(), R.string.author)
true true
} }
manga_cover.setOnClickListener { adapter.delegate.zoomImageFromThumb(cover_card) } manga_cover.setOnClickListener { adapter.delegate.zoomImageFromThumb(cover_card) }
@ -137,7 +137,7 @@ class MangaHeaderHolder(
else expand() else expand()
} }
manga_summary_label.text = itemView.context.getString( manga_summary_label.text = itemView.context.getString(
R.string.about_this, itemView.context.getString( R.string.about_this_, itemView.context.getString(
when { when {
manga.mangaType() == Manga.TYPE_MANHWA -> R.string.manhwa manga.mangaType() == Manga.TYPE_MANHWA -> R.string.manhwa
manga.mangaType() == Manga.TYPE_MANHUA -> R.string.manhua manga.mangaType() == Manga.TYPE_MANHUA -> R.string.manhua
@ -174,7 +174,7 @@ class MangaHeaderHolder(
with(track_button) { with(track_button) {
visibleIf(presenter.hasTrackers()) visibleIf(presenter.hasTrackers())
text = itemView.context.getString( text = itemView.context.getString(
if (tracked) R.string.action_filter_tracked if (tracked) R.string.tracked
else R.string.tracking else R.string.tracking
) )
@ -192,8 +192,8 @@ class MangaHeaderHolder(
text = if (nextChapter != null) { text = if (nextChapter != null) {
val number = adapter.decimalFormat.format(nextChapter.chapter_number.toDouble()) val number = adapter.decimalFormat.format(nextChapter.chapter_number.toDouble())
if (nextChapter.chapter_number > 0) resources.getString( if (nextChapter.chapter_number > 0) resources.getString(
if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter_
else R.string.start_reading_chapter, number else R.string.start_reading_chapter_, number
) )
else { else {
resources.getString( resources.getString(
@ -268,7 +268,7 @@ class MangaHeaderHolder(
val presenter = adapter.delegate.mangaPresenter() val presenter = adapter.delegate.mangaPresenter()
val tracked = presenter.isTracked() val tracked = presenter.isTracked()
with(track_button) { with(track_button) {
text = itemView.context.getString(if (tracked) R.string.action_filter_tracked text = itemView.context.getString(if (tracked) R.string.tracked
else R.string.tracking) else R.string.tracking)
icon = ContextCompat.getDrawable(itemView.context, if (tracked) R.drawable icon = ContextCompat.getDrawable(itemView.context, if (tracked) R.drawable

View File

@ -32,7 +32,7 @@ open class BaseChapterHolder(
// Hide download and show delete if the chapter is downloaded // Hide download and show delete if the chapter is downloaded
if (chapter.status != Download.DOWNLOADED) popup.menu.findItem(R.id.action_delete).title = download_button.context.getString( if (chapter.status != Download.DOWNLOADED) popup.menu.findItem(R.id.action_delete).title = download_button.context.getString(
R.string.action_cancel R.string.cancel
) )
// Set a listener so we are notified if a menu item is clicked // Set a listener so we are notified if a menu item is clicked

View File

@ -33,7 +33,7 @@ class ChapterHolder(
chapter_title.text = when (manga.displayMode) { chapter_title.text = when (manga.displayMode) {
Manga.DISPLAY_NUMBER -> { Manga.DISPLAY_NUMBER -> {
val number = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) val number = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
itemView.context.getString(R.string.display_mode_chapter, number) itemView.context.getString(R.string.chapter_, number)
} }
else -> chapter.name else -> chapter.name
} }
@ -68,7 +68,7 @@ class ChapterHolder(
} else if (!chapter.read && chapter.last_page_read > 0 && !isLocked) { } else if (!chapter.read && chapter.last_page_read > 0 && !isLocked) {
statuses.add( statuses.add(
itemView.context.getString( itemView.context.getString(
R.string.chapter_progress, chapter.last_page_read + 1 R.string.page_, chapter.last_page_read + 1
) )
) )
} }

View File

@ -42,9 +42,9 @@ class TrackHolder(view: View, adapter: TrackAdapter) : BaseViewHolder(view) {
R.string.chapter_x_of_y, track.last_chapter_read, track.total_chapters R.string.chapter_x_of_y, track.last_chapter_read, track.total_chapters
) )
track.last_chapter_read > 0 -> context.getString( track.last_chapter_read > 0 -> context.getString(
R.string.chapter_x, track.last_chapter_read R.string.chapter_, track.last_chapter_read
) )
else -> context.getString(R.string.action_filter_not_started) else -> context.getString(R.string.not_started)
} }
} }
val status = item.service.getStatus(track.status) val status = item.service.getStatus(track.status)

View File

@ -63,7 +63,7 @@ class TrackSearchDialog : DialogController {
val dialog = MaterialDialog(activity!!).apply { val dialog = MaterialDialog(activity!!).apply {
customView(viewRes = R.layout.track_search_dialog, scrollable = false) customView(viewRes = R.layout.track_search_dialog, scrollable = false)
negativeButton(android.R.string.cancel) negativeButton(android.R.string.cancel)
positiveButton(R.string.action_clear) { onPositiveButtonClick() } positiveButton(R.string.clear) { onPositiveButtonClick() }
setActionButtonEnabled(WhichButton.POSITIVE, wasPreviouslyTracked) setActionButtonEnabled(WhichButton.POSITIVE, wasPreviouslyTracked)
} }

View File

@ -110,7 +110,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) : Bott
val track = adapter?.getItem(position)?.track ?: return val track = adapter?.getItem(position)?.track ?: return
if (track.tracking_url.isBlank()) { if (track.tracking_url.isBlank()) {
activity.toast(R.string.url_not_set) activity.toast(R.string.url_not_set_click_again)
} else { } else {
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(track.tracking_url))) activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(track.tracking_url)))
controller.refreshTracker = position controller.refreshTracker = position

View File

@ -86,14 +86,14 @@ class MigrationController : NucleusController<MigrationPresenter>(),
fun render(state: ViewState) { fun render(state: ViewState) {
if (state.selectedSource == null) { if (state.selectedSource == null) {
title = resources?.getString(R.string.label_migration) title = resources?.getString(R.string.source_migration)
if (adapter !is SourceAdapter) { if (adapter !is SourceAdapter) {
adapter = SourceAdapter(this) adapter = SourceAdapter(this)
migration_recycler.adapter = adapter migration_recycler.adapter = adapter
} }
adapter?.updateDataSet(state.sourcesWithManga) adapter?.updateDataSet(state.sourcesWithManga)
} else { } else {
val switching = title == resources?.getString(R.string.label_migration) val switching = title == resources?.getString(R.string.source_migration)
title = state.selectedSource.toString() title = state.selectedSource.toString()
if (adapter !is MangaAdapter) { if (adapter !is MangaAdapter) {
adapter = MangaAdapter(this) adapter = MangaAdapter(this)

View File

@ -22,14 +22,14 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
} }
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val confirmRes = if (copy) R.plurals.confirm_copy else R.plurals.confirm_migration val confirmRes = if (copy) R.plurals.copy_manga else R.plurals.migrate_manga
val confirmString = applicationContext?.resources?.getQuantityString(confirmRes, mangaSet, val confirmString = applicationContext?.resources?.getQuantityString(confirmRes, mangaSet,
mangaSet, ( mangaSet, (
if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_x, mangaSkipped) if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_, mangaSkipped)
else "")) ?: "" else "")) ?: ""
return MaterialDialog(activity!!).show { return MaterialDialog(activity!!).show {
message(text = confirmString) message(text = confirmString)
positiveButton(if (copy) R.string.copy else R.string.migrate) { positiveButton(if (copy) R.string.copy_value else R.string.migrate) {
if (copy) (targetController as? MigrationListController)?.copyMangas() if (copy) (targetController as? MigrationListController)?.copyMangas()
else (targetController as? MigrationListController)?.migrateMangas() else (targetController as? MigrationListController)?.migrateMangas()
} }

View File

@ -138,7 +138,7 @@ class SearchController(
val preselected = MigrationFlags.getEnabledFlagsPositions(prefValue) val preselected = MigrationFlags.getEnabledFlagsPositions(prefValue)
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.message(R.string.migration_dialog_what_to_include) .message(R.string.select_data_to_include)
.listItemsMultiChoice(items = MigrationFlags.titles.map .listItemsMultiChoice(items = MigrationFlags.titles.map
{ resources?.getString(it) as CharSequence }, { resources?.getString(it) as CharSequence },
initialSelection = preselected.toIntArray()) { _, positions, _ -> initialSelection = preselected.toIntArray()) { _, positions, _ ->
@ -148,7 +148,7 @@ class SearchController(
.positiveButton(R.string.migrate) { .positiveButton(R.string.migrate) {
(targetController as? SearchController)?.migrateManga() (targetController as? SearchController)?.migrateManga()
} }
.negativeButton(R.string.copy) { .negativeButton(R.string.copy_value) {
(targetController as? SearchController)?.copyManga() (targetController as? SearchController)?.copyManga()
} }
} }

View File

@ -42,7 +42,7 @@ class SelectionHeader : AbstractHeaderItem<SelectionHeader.Holder>() {
class Holder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) : BaseFlexibleViewHolder(view, adapter) { class Holder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) : BaseFlexibleViewHolder(view, adapter) {
init { init {
title.text = view.context.getString(R.string.migration_selection_prompt) title.text = view.context.getString(R.string.select_a_source_to_migrate_from)
} }
} }

View File

@ -21,7 +21,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) :
get() = card get() = card
init { init {
source_latest.text = view.context.getString(R.string.action_auto) source_latest.text = view.context.getString(R.string.auto)
source_browse.setText(R.string.select) source_browse.setText(R.string.select)
source_browse.setOnClickListener { source_browse.setOnClickListener {
adapter.selectClickListener?.onSelectClick(adapterPosition) adapter.selectClickListener?.onSelectClick(adapterPosition)

View File

@ -114,7 +114,7 @@ class MigrationBottomSheetDialog(
skip_step.isChecked = preferences.skipPreMigration().getOrDefault() skip_step.isChecked = preferences.skipPreMigration().getOrDefault()
skip_step.setOnCheckedChangeListener { _, isChecked -> skip_step.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) (listener as? Controller)?.activity?.toast( if (isChecked) (listener as? Controller)?.activity?.toast(
R.string.pre_migration_skip_toast, Toast.LENGTH_LONG R.string.to_show_again_setting_library, Toast.LENGTH_LONG
) )
} }
} }

View File

@ -374,7 +374,7 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
adapter?.notifyDataSetChanged() adapter?.notifyDataSetChanged()
} else { } else {
migratingManga.manga.migrationStatus = MigrationStatus.MANGA_NOT_FOUND migratingManga.manga.migrationStatus = MigrationStatus.MANGA_NOT_FOUND
activity?.toast(R.string.error_fetching_migration, Toast.LENGTH_LONG) activity?.toast(R.string.no_chapters_found_for_migration, Toast.LENGTH_LONG)
adapter?.notifyDataSetChanged() adapter?.notifyDataSetChanged()
} }
} }
@ -397,8 +397,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
override fun handleBack(): Boolean { override fun handleBack(): Boolean {
activity?.let { activity?.let {
MaterialDialog(it).show { MaterialDialog(it).show {
title(R.string.stop_migration) title(R.string.stop_migrating)
positiveButton(R.string.action_stop) { positiveButton(R.string.stop) {
router.popCurrentController() router.popCurrentController()
migrationsJob?.cancel() migrationsJob?.cancel()
} }
@ -465,8 +465,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
if (migrationsJob?.isCancelled == false || adapter?.allMangasDone() == true) { if (migrationsJob?.isCancelled == false || adapter?.allMangasDone() == true) {
activity?.let { activity?.let {
MaterialDialog(it).show { MaterialDialog(it).show {
title(R.string.stop_migration) title(R.string.stop_migrating)
positiveButton(R.string.action_stop) { positiveButton(R.string.stop) {
block() block()
migrationsJob?.cancel() migrationsJob?.cancel()
} }

View File

@ -164,10 +164,10 @@ class MigrationProcessHolder(
val latestChapter = mangaChapters.maxBy { it.chapter_number }?.chapter_number ?: -1f val latestChapter = mangaChapters.maxBy { it.chapter_number }?.chapter_number ?: -1f
if (latestChapter > 0f) { if (latestChapter > 0f) {
subtitle.text = context.getString(R.string.latest_x, subtitle.text = context.getString(R.string.latest_,
DecimalFormat("#.#").format(latestChapter)) DecimalFormat("#.#").format(latestChapter))
} else { } else {
subtitle.text = context.getString(R.string.latest_x, subtitle.text = context.getString(R.string.latest_,
context.getString(R.string.unknown)) context.getString(R.string.unknown))
} }
} }

View File

@ -386,7 +386,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
if (noDefault && presenter.manga?.viewer!! > 0) { if (noDefault && presenter.manga?.viewer!! > 0) {
snackbar = reader_layout.snack( snackbar = reader_layout.snack(
getString( getString(
R.string.reading_mode, getString( R.string.reading_, getString(
when (mangaViewer) { when (mangaViewer) {
RIGHT_TO_LEFT -> R.string.right_to_left_viewer RIGHT_TO_LEFT -> R.string.right_to_left_viewer
VERTICAL -> R.string.vertical_viewer VERTICAL -> R.string.vertical_viewer
@ -396,7 +396,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
).toLowerCase(Locale.getDefault()) ).toLowerCase(Locale.getDefault())
), 8000 ), 8000
) { ) {
setAction(R.string.action_use_default) { setAction(R.string.use_default) {
presenter.setMangaViewer(0) presenter.setMangaViewer(0)
} }
} }
@ -564,7 +564,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
clipData = ClipData.newRawUri(null, stream) clipData = ClipData.newRawUri(null, stream)
type = "image/*" type = "image/*"
} }
startActivity(Intent.createChooser(intent, getString(R.string.action_share))) startActivity(Intent.createChooser(intent, getString(R.string.share)))
} }
/** /**
@ -605,8 +605,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
fun onSetAsCoverResult(result: ReaderPresenter.SetAsCoverResult) { fun onSetAsCoverResult(result: ReaderPresenter.SetAsCoverResult) {
toast(when (result) { toast(when (result) {
Success -> R.string.cover_updated Success -> R.string.cover_updated
AddToLibraryFirst -> R.string.notification_first_add_to_library AddToLibraryFirst -> R.string.must_be_in_library_to_edit
Error -> R.string.notification_cover_update_failed Error -> R.string.failed_to_update_cover
}) })
} }

View File

@ -63,7 +63,7 @@ class ReaderPageSheet(
if (page.status != Page.READY) return if (page.status != Page.READY) return
MaterialDialog(activity) MaterialDialog(activity)
.title(R.string.confirm_set_image_as_cover) .title(R.string.use_image_as_cover)
.positiveButton(android.R.string.yes) { .positiveButton(android.R.string.yes) {
activity.setAsCover(page) activity.setAsCover(page)
dismiss() dismiss()

View File

@ -66,11 +66,11 @@ class SaveImageNotifier(private val context: Context) {
setContentIntent(NotificationHandler.openImagePendingActivity(context, file)) setContentIntent(NotificationHandler.openImagePendingActivity(context, file))
// Share action // Share action
addAction(R.drawable.ic_share_grey_24dp, addAction(R.drawable.ic_share_grey_24dp,
context.getString(R.string.action_share), context.getString(R.string.share),
NotificationReceiver.shareImagePendingBroadcast(context, file.absolutePath, notificationId)) NotificationReceiver.shareImagePendingBroadcast(context, file.absolutePath, notificationId))
// Delete action // Delete action
addAction(R.drawable.ic_delete_grey_24dp, addAction(R.drawable.ic_delete_grey_24dp,
context.getString(R.string.action_delete), context.getString(R.string.delete),
NotificationReceiver.deleteImagePendingBroadcast(context, file.absolutePath, notificationId)) NotificationReceiver.deleteImagePendingBroadcast(context, file.absolutePath, notificationId))
updateNotification() updateNotification()
@ -96,7 +96,7 @@ class SaveImageNotifier(private val context: Context) {
fun onError(error: String?) { fun onError(error: String?) {
// Create notification // Create notification
with(notificationBuilder) { with(notificationBuilder) {
setContentTitle(context.getString(R.string.download_notifier_title_error)) setContentTitle(context.getString(R.string.download_error))
setContentText(error ?: context.getString(R.string.unknown_error)) setContentText(error ?: context.getString(R.string.unknown_error))
setSmallIcon(android.R.drawable.ic_menu_report_image) setSmallIcon(android.R.drawable.ic_menu_report_image)
} }

View File

@ -407,7 +407,7 @@ class PagerPageHolder(
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
gravity = Gravity.CENTER gravity = Gravity.CENTER
} }
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
page.chapter.pageLoader?.retryPage(page) page.chapter.pageLoader?.retryPage(page)
} }
@ -444,7 +444,7 @@ class PagerPageHolder(
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
setMargins(margins, margins, margins, margins) setMargins(margins, margins, margins, margins)
} }
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
page.chapter.pageLoader?.retryPage(page) page.chapter.pageLoader?.retryPage(page)
} }
@ -458,7 +458,7 @@ class PagerPageHolder(
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
setMargins(margins, margins, margins, margins) setMargins(margins, margins, margins, margins)
} }
setText(R.string.action_open_in_browser) setText(R.string.open_in_browser)
setOnClickListener { setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl)) val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl))
context.startActivity(intent) context.startActivity(intent)

View File

@ -93,16 +93,16 @@ class PagerTransitionHolder(
textView.text = if (nextChapter != null) { textView.text = if (nextChapter != null) {
SpannableStringBuilder().apply { SpannableStringBuilder().apply {
append(context.getString(R.string.transition_finished)) append(context.getString(R.string.finished))
setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${transition.from.chapter.name}\n\n") append("\n${transition.from.chapter.name}\n\n")
val currSize = length val currSize = length
append(context.getString(R.string.transition_next)) append(context.getString(R.string.next))
setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${nextChapter.chapter.name}\n\n") append("\n${nextChapter.chapter.name}\n\n")
} }
} else { } else {
context.getString(R.string.transition_no_next) context.getString(R.string.theres_no_next_chapter)
} }
if (nextChapter != null) { if (nextChapter != null) {
@ -118,16 +118,16 @@ class PagerTransitionHolder(
textView.text = if (prevChapter != null) { textView.text = if (prevChapter != null) {
SpannableStringBuilder().apply { SpannableStringBuilder().apply {
append(context.getString(R.string.transition_current)) append(context.getString(R.string.current))
setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${transition.from.chapter.name}\n\n") append("\n${transition.from.chapter.name}\n\n")
val currSize = length val currSize = length
append(context.getString(R.string.transition_previous)) append(context.getString(R.string.previous))
setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${prevChapter.chapter.name}\n\n") append("\n${prevChapter.chapter.name}\n\n")
} }
} else { } else {
context.getString(R.string.transition_no_previous) context.getString(R.string.theres_no_previous_chapter)
} }
if (prevChapter != null) { if (prevChapter != null) {
@ -162,7 +162,7 @@ class PagerTransitionHolder(
val textView = AppCompatTextView(context).apply { val textView = AppCompatTextView(context).apply {
wrapContent() wrapContent()
setText(R.string.transition_pages_loading) setText(R.string.loading_pages)
} }
pagesContainer.addView(progress) pagesContainer.addView(progress)
@ -182,12 +182,12 @@ class PagerTransitionHolder(
private fun setError(error: Throwable) { private fun setError(error: Throwable) {
val textView = AppCompatTextView(context).apply { val textView = AppCompatTextView(context).apply {
wrapContent() wrapContent()
text = context.getString(R.string.transition_pages_error, error.message) text = context.getString(R.string.failed_to_load_pages_, error.message)
} }
val retryBtn = PagerButton(context, viewer).apply { val retryBtn = PagerButton(context, viewer).apply {
wrapContent() wrapContent()
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
val toChapter = transition.to val toChapter = transition.to
if (toChapter != null) { if (toChapter != null) {

View File

@ -391,7 +391,7 @@ class WebtoonPageHolder(
gravity = Gravity.CENTER_HORIZONTAL gravity = Gravity.CENTER_HORIZONTAL
setMargins(0, parentHeight / 4, 0, 0) setMargins(0, parentHeight / 4, 0, 0)
} }
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
page?.let { it.chapter.pageLoader?.retryPage(it) } page?.let { it.chapter.pageLoader?.retryPage(it) }
} }
@ -432,7 +432,7 @@ class WebtoonPageHolder(
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
setMargins(0, margins, 0, margins) setMargins(0, margins, 0, margins)
} }
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
page?.let { it.chapter.pageLoader?.retryPage(it) } page?.let { it.chapter.pageLoader?.retryPage(it) }
} }
@ -446,7 +446,7 @@ class WebtoonPageHolder(
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply { layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
setMargins(0, margins, 0, margins) setMargins(0, margins, 0, margins)
} }
setText(R.string.action_open_in_browser) setText(R.string.open_in_browser)
setOnClickListener { setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl)) val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl))
context.startActivity(intent) context.startActivity(intent)

View File

@ -93,16 +93,16 @@ class WebtoonTransitionHolder(
textView.text = if (nextChapter != null) { textView.text = if (nextChapter != null) {
SpannableStringBuilder().apply { SpannableStringBuilder().apply {
append(context.getString(R.string.transition_finished)) append(context.getString(R.string.finished))
setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${transition.from.chapter.name}\n\n") append("\n${transition.from.chapter.name}\n\n")
val currSize = length val currSize = length
append(context.getString(R.string.transition_next)) append(context.getString(R.string.next))
setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${nextChapter.chapter.name}\n\n") append("\n${nextChapter.chapter.name}\n\n")
} }
} else { } else {
context.getString(R.string.transition_no_next) context.getString(R.string.theres_no_next_chapter)
} }
if (nextChapter != null) { if (nextChapter != null) {
@ -118,16 +118,16 @@ class WebtoonTransitionHolder(
textView.text = if (prevChapter != null) { textView.text = if (prevChapter != null) {
SpannableStringBuilder().apply { SpannableStringBuilder().apply {
append(context.getString(R.string.transition_current)) append(context.getString(R.string.current))
setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${transition.from.chapter.name}\n\n") append("\n${transition.from.chapter.name}\n\n")
val currSize = length val currSize = length
append(context.getString(R.string.transition_previous)) append(context.getString(R.string.previous))
setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
append("\n${prevChapter.chapter.name}\n\n") append("\n${prevChapter.chapter.name}\n\n")
} }
} else { } else {
context.getString(R.string.transition_no_previous) context.getString(R.string.theres_no_previous_chapter)
} }
if (prevChapter != null) { if (prevChapter != null) {
@ -174,7 +174,7 @@ class WebtoonTransitionHolder(
val textView = AppCompatTextView(context).apply { val textView = AppCompatTextView(context).apply {
wrapContent() wrapContent()
setText(R.string.transition_pages_loading) setText(R.string.loading_pages)
} }
pagesContainer.addView(progress) pagesContainer.addView(progress)
@ -194,12 +194,12 @@ class WebtoonTransitionHolder(
private fun setError(error: Throwable, transition: ChapterTransition) { private fun setError(error: Throwable, transition: ChapterTransition) {
val textView = AppCompatTextView(context).apply { val textView = AppCompatTextView(context).apply {
wrapContent() wrapContent()
text = context.getString(R.string.transition_pages_error, error.message) text = context.getString(R.string.failed_to_load_pages_, error.message)
} }
val retryBtn = AppCompatButton(context).apply { val retryBtn = AppCompatButton(context).apply {
wrapContent() wrapContent()
setText(R.string.action_retry) setText(R.string.retry)
setOnClickListener { setOnClickListener {
val toChapter = transition.to val toChapter = transition.to
if (toChapter != null) { if (toChapter != null) {

View File

@ -1,32 +0,0 @@
package eu.kanade.tachiyomi.ui.recent_updates
import android.app.Dialog
import android.os.Bundle
import com.afollestad.materialdialogs.MaterialDialog
import com.bluelinelabs.conductor.Controller
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.base.controller.DialogController
class ConfirmDeleteChaptersDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
where T : Controller, T : ConfirmDeleteChaptersDialog.Listener {
private var chaptersToDelete = emptyList<RecentChapterItem>()
constructor(target: T, chaptersToDelete: List<RecentChapterItem>) : this() {
this.chaptersToDelete = chaptersToDelete
targetController = target
}
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!)
.message(R.string.confirm_delete_chapters)
.positiveButton(android.R.string.yes) {
(targetController as? Listener)?.deleteChapters(chaptersToDelete)
}
.negativeButton(android.R.string.no)
}
interface Listener {
fun deleteChapters(chaptersToDelete: List<RecentChapterItem>)
}
}

View File

@ -53,7 +53,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle),
private var lastChapterId: Long? = null private var lastChapterId: Long? = null
override fun getTitle(): String? { override fun getTitle(): String? {
return resources?.getString(R.string.label_recent_updates) return resources?.getString(R.string.recent_updates)
} }
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
@ -161,7 +161,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle),
if (size > 0) { if (size > 0) {
empty_view?.hide() empty_view?.hide()
} else { } else {
empty_view?.show(R.drawable.ic_update_black_128dp, R.string.information_no_recent) empty_view?.show(R.drawable.ic_update_black_128dp, R.string.no_recent_chapters)
} }
} }
@ -203,7 +203,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle),
if (!read) { if (!read) {
snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) { snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) {
var undoing = false var undoing = false
setAction(R.string.action_undo) { setAction(R.string.undo) {
presenter.markChapterRead(item, read, lastRead, pagesLeft) presenter.markChapterRead(item, read, lastRead, pagesLeft)
undoing = true undoing = true
} }

View File

@ -129,7 +129,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
empty_view?.hide() empty_view?.hide()
} else { } else {
empty_view.show(R.drawable.ic_history_white_128dp, R.string empty_view.show(R.drawable.ic_history_white_128dp, R.string
.information_no_recent_manga) .no_recently_read_manga)
} }
} }
@ -163,7 +163,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
val intent = ReaderActivity.newIntent(activity, manga, nextChapter) val intent = ReaderActivity.newIntent(activity, manga, nextChapter)
startActivity(intent) startActivity(intent)
} else { } else {
activity.toast(R.string.no_next_chapter) activity.toast(R.string.next_chapter_not_found)
} }
} }

View File

@ -52,7 +52,7 @@ class RecentlyReadHolder(
// Set source + chapter title // Set source + chapter title
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble()) val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
manga_source.text = itemView.context.getString(R.string.recent_manga_source) manga_source.text = itemView.context.getString(R.string.source_dash_chapter_)
.format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber) .format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber)
// Set last read timestamp title // Set last read timestamp title

View File

@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.models.History import eu.kanade.tachiyomi.data.database.models.History
import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.ui.base.controller.DialogController import eu.kanade.tachiyomi.ui.base.controller.DialogController
import java.util.Locale
class RemoveHistoryDialog<T>(bundle: Bundle? = null) : DialogController(bundle) class RemoveHistoryDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
where T : Controller, T : RemoveHistoryDialog.Listener { where T : Controller, T : RemoveHistoryDialog.Listener {
@ -27,12 +28,15 @@ class RemoveHistoryDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val activity = activity!! val activity = activity!!
return MaterialDialog(activity) return MaterialDialog(activity).title(R.string.remove)
.title(R.string.action_remove) .message(R.string.this_will_reomve_the_read_date_question).checkBoxPrompt(
.message(R.string.dialog_with_checkbox_remove_description) text = activity.getString(
.checkBoxPrompt(res = R.string.dialog_with_checkbox_reset) {} R.string.reset_all_chapters_for_this_,
.negativeButton(android.R.string.cancel) (manga?.mangaType(activity) ?: activity.getString(R.string.manga)).toLowerCase(
.positiveButton(R.string.action_remove) { Locale.ROOT
)
)
) {}.negativeButton(android.R.string.cancel).positiveButton(R.string.remove) {
onPositive(it.isCheckPromptChecked()) onPositive(it.isCheckPromptChecked())
} }
} }

View File

@ -43,17 +43,17 @@ class RecentMangaHolder(
val notValidNum = item.mch.chapter.chapter_number <= 0 val notValidNum = item.mch.chapter.chapter_number <= 0
body.text = when { body.text = when {
item.mch.chapter.id == null -> body.context.getString( item.mch.chapter.id == null -> body.context.getString(
R.string.added_x, DateUtils.getRelativeTimeSpanString( R.string.added_, DateUtils.getRelativeTimeSpanString(
item.mch.manga.date_added, Date().time, DateUtils.MINUTE_IN_MILLIS item.mch.manga.date_added, Date().time, DateUtils.MINUTE_IN_MILLIS
).toString() ).toString()
) )
item.mch.history.id == null -> body.context.getString( item.mch.history.id == null -> body.context.getString(
R.string.updated_x, DateUtils.getRelativeTimeSpanString( R.string.updated_, DateUtils.getRelativeTimeSpanString(
item.chapter.date_upload, Date().time, DateUtils.HOUR_IN_MILLIS item.chapter.date_upload, Date().time, DateUtils.HOUR_IN_MILLIS
).toString() ).toString()
) )
item.chapter.id != item.mch.chapter.id -> body.context.getString( item.chapter.id != item.mch.chapter.id -> body.context.getString(
if (notValidNum) R.string.last_read_x else R.string.last_read_chapter_x, if (notValidNum) R.string.last_read_ else R.string.last_read_chapter_,
if (notValidNum) item.mch.chapter.name else adapter.decimalFormat.format(item.mch.chapter.chapter_number) + if (notValidNum) item.mch.chapter.name else adapter.decimalFormat.format(item.mch.chapter.chapter_number) +
" (${DateUtils.getRelativeTimeSpanString( " (${DateUtils.getRelativeTimeSpanString(
item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS
@ -66,7 +66,7 @@ class RecentMangaHolder(
item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS
)})" )})"
isSearch -> body.context.getString( isSearch -> body.context.getString(
R.string.read_x, DateUtils.getRelativeTimeSpanString( R.string.read_, DateUtils.getRelativeTimeSpanString(
item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS item.mch.history.last_read, Date().time, DateUtils.MINUTE_IN_MILLIS
).toString() ).toString()
) )

View File

@ -77,8 +77,8 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle),
override fun getTitle(): String? { override fun getTitle(): String? {
return if (showingDownloads) return if (showingDownloads)
resources?.getString(R.string.label_download_queue) resources?.getString(R.string.download_queue)
else resources?.getString(R.string.short_recents) else resources?.getString(R.string.recents)
} }
override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
@ -296,7 +296,7 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle),
snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) { snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) {
anchorView = activity?.bottom_nav anchorView = activity?.bottom_nav
var undoing = false var undoing = false
setAction(R.string.action_undo) { setAction(R.string.undo) {
presenter.markChapterRead(chapter, false, lastRead, pagesLeft) presenter.markChapterRead(chapter, false, lastRead, pagesLeft)
undoing = true undoing = true
} }

View File

@ -49,12 +49,12 @@ class SettingsAboutController : SettingsController() {
private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_about titleRes = R.string.about
switchPreference { switchPreference {
key = "acra.enable" key = "acra.enable"
titleRes = R.string.pref_enable_acra titleRes = R.string.send_crash_report
summaryRes = R.string.pref_acra_summary summaryRes = R.string.helps_fix_bugs
defaultValue = true defaultValue = true
} }
preference { preference {
@ -102,7 +102,7 @@ class SettingsAboutController : SettingsController() {
private fun checkVersion() { private fun checkVersion() {
if (activity == null) return if (activity == null) return
activity?.toast(R.string.update_check_look_for_updates) activity?.toast(R.string.searching_for_updates)
scope.launch { scope.launch {
val result = try { val result = try {
updateChecker.checkForUpdate() updateChecker.checkForUpdate()
@ -122,7 +122,7 @@ class SettingsAboutController : SettingsController() {
} }
is UpdateResult.NoNewUpdate -> { is UpdateResult.NoNewUpdate -> {
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
activity?.toast(R.string.update_check_no_new_updates) activity?.toast(R.string.no_new_updates_available)
} }
} }
} }
@ -138,9 +138,9 @@ class SettingsAboutController : SettingsController() {
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.update_check_title) .title(R.string.new_version_available)
.message(text = args.getString(BODY_KEY) ?: "") .message(text = args.getString(BODY_KEY) ?: "")
.positiveButton(R.string.update_check_confirm) { .positiveButton(R.string.download) {
val appContext = applicationContext val appContext = applicationContext
if (appContext != null) { if (appContext != null) {
// Start download // Start download
@ -148,7 +148,7 @@ class SettingsAboutController : SettingsController() {
UpdaterService.downloadUpdate(appContext, url) UpdaterService.downloadUpdate(appContext, url)
} }
} }
.negativeButton(R.string.update_check_ignore) .negativeButton(R.string.ignore)
} }
private companion object { private companion object {

View File

@ -37,17 +37,17 @@ class SettingsAdvancedController : SettingsController() {
private val db: DatabaseHelper by injectLazy() private val db: DatabaseHelper by injectLazy()
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_advanced titleRes = R.string.advanced
preference { preference {
key = CLEAR_CACHE_KEY key = CLEAR_CACHE_KEY
titleRes = R.string.pref_clear_chapter_cache titleRes = R.string.clear_chapter_cache
summary = context.getString(R.string.used_cache, chapterCache.readableSize) summary = context.getString(R.string.used_, chapterCache.readableSize)
onClick { clearChapterCache() } onClick { clearChapterCache() }
} }
preference { preference {
titleRes = R.string.pref_clear_cookies titleRes = R.string.clear_cookies
onClick { onClick {
network.cookieManager.removeAll() network.cookieManager.removeAll()
@ -55,8 +55,8 @@ class SettingsAdvancedController : SettingsController() {
} }
} }
preference { preference {
titleRes = R.string.pref_clear_database titleRes = R.string.clear_database
summaryRes = R.string.pref_clear_database_summary summaryRes = R.string.clear_database_summary
onClick { onClick {
val ctrl = ClearDatabaseDialogController() val ctrl = ClearDatabaseDialogController()
@ -65,21 +65,21 @@ class SettingsAdvancedController : SettingsController() {
} }
} }
preference { preference {
titleRes = R.string.pref_refresh_library_metadata titleRes = R.string.refresh_library_metadata
summaryRes = R.string.pref_refresh_library_metadata_summary summaryRes = R.string.updates_covers_genres_desc
onClick { LibraryUpdateService.start(context, target = Target.DETAILS) } onClick { LibraryUpdateService.start(context, target = Target.DETAILS) }
} }
preference { preference {
titleRes = R.string.pref_refresh_library_tracking titleRes = R.string.refresh_tracking_metadata
summaryRes = R.string.pref_refresh_library_tracking_summary summaryRes = R.string.updates_tracking_details
onClick { LibraryUpdateService.start(context, target = Target.TRACKING) } onClick { LibraryUpdateService.start(context, target = Target.TRACKING) }
} }
preference { preference {
titleRes = R.string.pref_clean_downloads titleRes = R.string.clean_up_downloaded_chapters
summaryRes = R.string.pref_clean_downloads_summary summaryRes = R.string.delete_unused_chapters
onClick { cleanupDownloads() } onClick { cleanupDownloads() }
} }
@ -101,7 +101,7 @@ class SettingsAdvancedController : SettingsController() {
launchUI { launchUI {
val activity = activity ?: return@launchUI val activity = activity ?: return@launchUI
val cleanupString = val cleanupString =
if (foldersCleared == 0) activity.getString(R.string.no_cleanup_done) if (foldersCleared == 0) activity.getString(R.string.no_folders_to_cleanup)
else resources!!.getQuantityString( else resources!!.getQuantityString(
R.plurals.cleanup_done, R.plurals.cleanup_done,
foldersCleared, foldersCleared,
@ -130,10 +130,10 @@ class SettingsAdvancedController : SettingsController() {
}, { }, {
activity?.toast(R.string.cache_delete_error) activity?.toast(R.string.cache_delete_error)
}, { }, {
activity?.toast(resources?.getQuantityString(R.plurals.cache_deleted, activity?.toast(resources?.getQuantityString(R.plurals.cache_cleared,
deletedFiles, deletedFiles)) deletedFiles, deletedFiles))
findPreference(CLEAR_CACHE_KEY)?.summary = findPreference(CLEAR_CACHE_KEY)?.summary =
resources?.getString(R.string.used_cache, chapterCache.readableSize) resources?.getString(R.string.used_, chapterCache.readableSize)
}) })
} }

View File

@ -58,8 +58,8 @@ class SettingsBackupController : SettingsController() {
titleRes = R.string.backup titleRes = R.string.backup
preference { preference {
titleRes = R.string.pref_create_backup titleRes = R.string.create_backup
summaryRes = R.string.pref_create_backup_summ summaryRes = R.string.can_be_used_to_restore
onClick { onClick {
val ctrl = CreateBackupDialog() val ctrl = CreateBackupDialog()
@ -68,27 +68,27 @@ class SettingsBackupController : SettingsController() {
} }
} }
preference { preference {
titleRes = R.string.pref_restore_backup titleRes = R.string.restore_backup
summaryRes = R.string.pref_restore_backup_summ summaryRes = R.string.restore_from_backup_file
onClick { onClick {
val intent = Intent(Intent.ACTION_GET_CONTENT) val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.addCategory(Intent.CATEGORY_OPENABLE) intent.addCategory(Intent.CATEGORY_OPENABLE)
intent.type = "application/*" intent.type = "application/*"
val title = resources?.getString(R.string.file_select_backup) val title = resources?.getString(R.string.select_backup_file)
val chooser = Intent.createChooser(intent, title) val chooser = Intent.createChooser(intent, title)
startActivityForResult(chooser, CODE_BACKUP_RESTORE) startActivityForResult(chooser, CODE_BACKUP_RESTORE)
} }
} }
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_backup_service_category titleRes = R.string.service
intListPreference(activity) { intListPreference(activity) {
key = Keys.backupInterval key = Keys.backupInterval
titleRes = R.string.pref_backup_interval titleRes = R.string.backup_frequency
entriesRes = arrayOf(R.string.update_never, R.string.update_6hour, entriesRes = arrayOf(R.string.manual, R.string.every_6_hours,
R.string.update_12hour, R.string.update_24hour, R.string.every_12_hours, R.string.daily,
R.string.update_48hour, R.string.update_weekly) R.string.every_2_days, R.string.weekly)
entryValues = listOf(0, 6, 12, 24, 48, 168) entryValues = listOf(0, 6, 12, 24, 48, 168)
defaultValue = 0 defaultValue = 0
@ -105,7 +105,7 @@ class SettingsBackupController : SettingsController() {
} }
val backupDir = preference { val backupDir = preference {
key = Keys.backupDirectory key = Keys.backupDirectory
titleRes = R.string.pref_backup_directory titleRes = R.string.backup_location
onClick { onClick {
val currentDir = preferences.backupsDirectory().getOrDefault() val currentDir = preferences.backupsDirectory().getOrDefault()
@ -126,7 +126,7 @@ class SettingsBackupController : SettingsController() {
} }
val backupNumber = intListPreference(activity) { val backupNumber = intListPreference(activity) {
key = Keys.numberOfBackups key = Keys.numberOfBackups
titleRes = R.string.pref_backup_slots titleRes = R.string.max_auto_backups
entries = listOf("1", "2", "3", "4", "5") entries = listOf("1", "2", "3", "4", "5")
entryRange = 1..5 entryRange = 1..5
defaultValue = 1 defaultValue = 1
@ -210,8 +210,8 @@ class SettingsBackupController : SettingsController() {
.map { activity.getString(it) } .map { activity.getString(it) }
return MaterialDialog(activity) return MaterialDialog(activity)
.title(R.string.pref_create_backup) .title(R.string.create_backup)
.message(R.string.backup_choice) .message(R.string.what_should_backup)
.listItemsMultiChoice(items = options, disabledIndices = intArrayOf(0), .listItemsMultiChoice(items = options, disabledIndices = intArrayOf(0),
initialSelection = intArrayOf(0)) { _, positions, _ -> initialSelection = intArrayOf(0)) { _, positions, _ ->
var flags = 0 var flags = 0
@ -226,7 +226,7 @@ class SettingsBackupController : SettingsController() {
(targetController as? SettingsBackupController)?.createBackup(flags) (targetController as? SettingsBackupController)?.createBackup(flags)
} }
.positiveButton(R.string.action_create) .positiveButton(R.string.create)
.negativeButton(android.R.string.cancel) .negativeButton(android.R.string.cancel)
} }
} }
@ -242,9 +242,9 @@ class SettingsBackupController : SettingsController() {
return MaterialDialog(activity).apply { return MaterialDialog(activity).apply {
title(R.string.backup_created) title(R.string.backup_created)
if (uniFile.filePath != null) if (uniFile.filePath != null)
message(text = resources?.getString(R.string.file_saved, uniFile.filePath)) message(text = resources?.getString(R.string.file_saved_at_, uniFile.filePath))
positiveButton(R.string.action_close) positiveButton(R.string.close)
negativeButton(R.string.action_share) { negativeButton(R.string.share) {
val sendIntent = Intent(Intent.ACTION_SEND) val sendIntent = Intent(Intent.ACTION_SEND)
sendIntent.type = "application/json" sendIntent.type = "application/json"
sendIntent.putExtra(Intent.EXTRA_STREAM, uniFile.uri) sendIntent.putExtra(Intent.EXTRA_STREAM, uniFile.uri)
@ -265,9 +265,9 @@ class SettingsBackupController : SettingsController() {
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
return MaterialDialog(activity!!) return MaterialDialog(activity!!)
.title(R.string.pref_restore_backup) .title(R.string.restore_backup)
.message(R.string.backup_restore_content) .message(R.string.restore_message)
.positiveButton(R.string.action_restore) { .positiveButton(R.string.restore) {
val context = applicationContext val context = applicationContext
if (context != null) { if (context != null) {
activity?.toast(R.string.restoring_backup) activity?.toast(R.string.restoring_backup)

View File

@ -29,11 +29,11 @@ class SettingsDownloadController : SettingsController() {
private val db: DatabaseHelper by injectLazy() private val db: DatabaseHelper by injectLazy()
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_downloads titleRes = R.string.downloads
preference { preference {
key = Keys.downloadsDirectory key = Keys.downloadsDirectory
titleRes = R.string.pref_download_directory titleRes = R.string.download_location
onClick { onClick {
val ctrl = DownloadDirectoriesDialog() val ctrl = DownloadDirectoriesDialog()
ctrl.targetController = this@SettingsDownloadController ctrl.targetController = this@SettingsDownloadController
@ -48,20 +48,20 @@ class SettingsDownloadController : SettingsController() {
} }
switchPreference { switchPreference {
key = Keys.downloadOnlyOverWifi key = Keys.downloadOnlyOverWifi
titleRes = R.string.pref_download_only_over_wifi titleRes = R.string.only_download_over_wifi
defaultValue = true defaultValue = true
} }
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_remove_after_read titleRes = R.string.remove_after_read
switchPreference { switchPreference {
key = Keys.removeAfterMarkedAsRead key = Keys.removeAfterMarkedAsRead
titleRes = R.string.pref_remove_after_marked_as_read titleRes = R.string.remove_when_marked_as_read
defaultValue = false defaultValue = false
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.removeAfterReadSlots key = Keys.removeAfterReadSlots
titleRes = R.string.pref_remove_after_read titleRes = R.string.remove_after_read
entriesRes = arrayOf(R.string.disabled, R.string.last_read_chapter, entriesRes = arrayOf(R.string.disabled, R.string.last_read_chapter,
R.string.second_to_last, R.string.third_to_last, R.string.fourth_to_last, R.string.second_to_last, R.string.third_to_last, R.string.fourth_to_last,
R.string.fifth_to_last) R.string.fifth_to_last)
@ -73,16 +73,16 @@ class SettingsDownloadController : SettingsController() {
val dbCategories = db.getCategories().executeAsBlocking() val dbCategories = db.getCategories().executeAsBlocking()
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_download_new titleRes = R.string.download_new_chapters
switchPreference { switchPreference {
key = Keys.downloadNew key = Keys.downloadNew
titleRes = R.string.pref_download_new titleRes = R.string.download_new_chapters
defaultValue = false defaultValue = false
} }
multiSelectListPreferenceMat(activity) { multiSelectListPreferenceMat(activity) {
key = Keys.downloadNewCategories key = Keys.downloadNewCategories
titleRes = R.string.pref_download_new_categories titleRes = R.string.categories_to_include_in_download
entries = dbCategories.map { it.name } entries = dbCategories.map { it.name }
entryValues = dbCategories.map { it.id.toString() } entryValues = dbCategories.map { it.id.toString() }
allSelectionRes = R.string.all allSelectionRes = R.string.all
@ -145,7 +145,7 @@ class SettingsDownloadController : SettingsController() {
override fun onCreateDialog(savedViewState: Bundle?): Dialog { override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val activity = activity!! val activity = activity!!
val currentDir = preferences.downloadsDirectory().getOrDefault() val currentDir = preferences.downloadsDirectory().getOrDefault()
val externalDirs = getExternalDirs() + File(activity.getString(R.string.custom_dir)) val externalDirs = getExternalDirs() + File(activity.getString(R.string.custom_location))
val selectedIndex = externalDirs.map(File::toString).indexOfFirst { it in currentDir } val selectedIndex = externalDirs.map(File::toString).indexOfFirst { it in currentDir }
return MaterialDialog(activity) return MaterialDialog(activity)

View File

@ -16,11 +16,11 @@ class SettingsGeneralController : SettingsController() {
private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_general titleRes = R.string.general
listPreference(activity) { listPreference(activity) {
key = Keys.lang key = Keys.lang
titleRes = R.string.pref_language titleRes = R.string.language
entryValues = listOf("", "ar", "bg", "bn", "ca", "cs", "de", "el", "en-US", "en-GB", entryValues = listOf("", "ar", "bg", "bn", "ca", "cs", "de", "el", "en-US", "en-GB",
"es", "fr", "hi", "hu", "in", "it", "ja", "ko", "lv", "ms", "nb-rNO", "nl", "pl", "pt", "es", "fr", "hi", "hu", "in", "it", "ja", "ko", "lv", "ms", "nb-rNO", "nl", "pl", "pt",
"pt-BR", "ro", "ru", "sc", "sr", "sv", "th", "tl", "tr", "uk", "vi", "zh-rCN") "pt-BR", "ro", "ru", "sc", "sr", "sv", "th", "tl", "tr", "uk", "vi", "zh-rCN")
@ -44,10 +44,11 @@ class SettingsGeneralController : SettingsController() {
intListPreference(activity) { intListPreference(activity) {
key = Keys.theme key = Keys.theme
titleRes = R.string.pref_theme titleRes = R.string.app_theme
entriesRes = arrayOf(R.string.white_theme, R.string.light_theme, R.string.dark_theme, entriesRes = arrayOf(R.string.white_theme, R.string.light_blue, R.string.dark,
R.string.amoled_theme, R.string.darkblue_theme, R.string.system_theme, R.string.system_amoled_theme, R.string.amoled_black, R.string.dark_blue, R.string.system_default, R.string
R.string.system_darkblue_theme) .system_default_amoled,
R.string.system_default_all_blue)
entryValues = listOf(1, 8, 2, 3, 4, 5, 6, 7) entryValues = listOf(1, 8, 2, 3, 4, 5, 6, 7)
defaultValue = 5 defaultValue = 5
@ -59,7 +60,7 @@ class SettingsGeneralController : SettingsController() {
listPreference(activity) { listPreference(activity) {
key = Keys.dateFormat key = Keys.dateFormat
titleRes = R.string.pref_date_format titleRes = R.string.date_format
entryValues = listOf("", "MM/dd/yy", "dd/MM/yy", "yyyy-MM-dd") entryValues = listOf("", "MM/dd/yy", "dd/MM/yy", "yyyy-MM-dd")
entries = entryValues.map { value -> entries = entryValues.map { value ->
if (value == "") { if (value == "") {
@ -74,8 +75,8 @@ class SettingsGeneralController : SettingsController() {
switchPreference { switchPreference {
key = Keys.automaticUpdates key = Keys.automaticUpdates
titleRes = R.string.pref_enable_automatic_updates titleRes = R.string.check_for_updates
summaryRes = R.string.pref_enable_automatic_updates_summary summaryRes = R.string.auto_check_for_app_versions
defaultValue = true defaultValue = true
if (isUpdaterEnabled) { if (isUpdaterEnabled) {
@ -94,7 +95,7 @@ class SettingsGeneralController : SettingsController() {
} }
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_category_security titleRes = R.string.security
val biometricManager = BiometricManager.from(context) val biometricManager = BiometricManager.from(context)
if (biometricManager.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) { if (biometricManager.canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS) {
@ -116,8 +117,8 @@ class SettingsGeneralController : SettingsController() {
val values = listOf(0, 2, 5, 10, 20, 30, 60, 90, 120, -1) val values = listOf(0, 2, 5, 10, 20, 30, 60, 90, 120, -1)
entries = values.mapNotNull { entries = values.mapNotNull {
when (it) { when (it) {
0 -> context.getString(R.string.lock_always) 0 -> context.getString(R.string.always)
-1 -> context.getString(R.string.lock_never) -1 -> context.getString(R.string.never)
else -> resources?.getQuantityString( else -> resources?.getQuantityString(
R.plurals.lock_after_mins, it.toInt(), it R.plurals.lock_after_mins, it.toInt(), it
) )
@ -130,8 +131,8 @@ class SettingsGeneralController : SettingsController() {
switchPreference { switchPreference {
key = Keys.secureScreen key = Keys.secureScreen
titleRes = R.string.pref_secure_screen titleRes = R.string.secure_screen
summaryRes = R.string.pref_secure_screen_summary summaryRes = R.string.hide_tachi_from_recents
defaultValue = false defaultValue = false
onChange { onChange {

View File

@ -1,22 +1,14 @@
package eu.kanade.tachiyomi.ui.setting package eu.kanade.tachiyomi.ui.setting
import android.app.Dialog
import android.os.Bundle
import android.os.Handler import android.os.Handler
import android.view.View
import androidx.preference.PreferenceScreen import androidx.preference.PreferenceScreen
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.customview.customView
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.DatabaseHelper import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.database.models.Category import eu.kanade.tachiyomi.data.database.models.Category
import eu.kanade.tachiyomi.data.library.LibraryUpdateJob import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.preference.getOrDefault import eu.kanade.tachiyomi.data.preference.getOrDefault
import eu.kanade.tachiyomi.ui.base.controller.DialogController
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.category.CategoryController import eu.kanade.tachiyomi.ui.category.CategoryController
import kotlinx.android.synthetic.main.pref_library_columns.view.*
import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get import uy.kohesive.injekt.api.get
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
@ -26,9 +18,9 @@ class SettingsLibraryController : SettingsController() {
private val db: DatabaseHelper = Injekt.get() private val db: DatabaseHelper = Injekt.get()
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_library titleRes = R.string.library
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_category_library_display titleRes = R.string.display
switchPreference { switchPreference {
key = Keys.removeArticles key = Keys.removeArticles
titleRes = R.string.pref_remove_articles titleRes = R.string.pref_remove_articles
@ -40,9 +32,9 @@ class SettingsLibraryController : SettingsController() {
val dbCategories = db.getCategories().executeAsBlocking() val dbCategories = db.getCategories().executeAsBlocking()
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_category_library_categories titleRes = R.string.categories
preference { preference {
titleRes = R.string.action_edit_categories titleRes = R.string.edit_categories
val catCount = db.getCategories().executeAsBlocking().size val catCount = db.getCategories().executeAsBlocking().size
summary = context.resources.getQuantityString(R.plurals.category, catCount, catCount) summary = context.resources.getQuantityString(R.plurals.category, catCount, catCount)
onClick { router.pushController(CategoryController().withFadeTransaction()) } onClick { router.pushController(CategoryController().withFadeTransaction()) }
@ -53,24 +45,24 @@ class SettingsLibraryController : SettingsController() {
val categories = listOf(Category.createDefault(context)) + dbCategories val categories = listOf(Category.createDefault(context)) + dbCategories
entries = entries =
listOf(context.getString(R.string.default_category_summary)) + categories.map { it.name }.toTypedArray() listOf(context.getString(R.string.always_ask)) + categories.map { it.name }.toTypedArray()
entryValues = listOf(-1) + categories.mapNotNull { it.id }.toList() entryValues = listOf(-1) + categories.mapNotNull { it.id }.toList()
defaultValue = "-1" defaultValue = "-1"
val selectedCategory = categories.find { it.id == preferences.defaultCategory() } val selectedCategory = categories.find { it.id == preferences.defaultCategory() }
summary = summary =
selectedCategory?.name ?: context.getString(R.string.default_category_summary) selectedCategory?.name ?: context.getString(R.string.always_ask)
onChange { newValue -> onChange { newValue ->
summary = categories.find { summary = categories.find {
it.id == newValue as Int it.id == newValue as Int
}?.name ?: context.getString(R.string.default_category_summary) }?.name ?: context.getString(R.string.always_ask)
true true
} }
} }
} }
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_category_library_update titleRes = R.string.updates
intListPreference(activity) { intListPreference(activity) {
key = Keys.updateOnRefresh key = Keys.updateOnRefresh
titleRes = R.string.categories_on_manual titleRes = R.string.categories_on_manual
@ -85,14 +77,14 @@ class SettingsLibraryController : SettingsController() {
key = Keys.libraryUpdateInterval key = Keys.libraryUpdateInterval
titleRes = R.string.pref_library_update_interval titleRes = R.string.pref_library_update_interval
entriesRes = arrayOf( entriesRes = arrayOf(
R.string.update_never, R.string.manual,
R.string.update_1hour, R.string.hourly,
R.string.update_2hour, R.string.every_2_hours,
R.string.update_3hour, R.string.every_3_hours,
R.string.update_6hour, R.string.every_6_hours,
R.string.update_12hour, R.string.every_12_hours,
R.string.update_24hour, R.string.daily,
R.string.update_48hour R.string.every_2_days
) )
entryValues = listOf(0, 1, 2, 3, 6, 12, 24, 48) entryValues = listOf(0, 1, 2, 3, 6, 12, 24, 48)
defaultValue = 0 defaultValue = 0
@ -110,10 +102,10 @@ class SettingsLibraryController : SettingsController() {
} }
multiSelectListPreferenceMat(activity) { multiSelectListPreferenceMat(activity) {
key = Keys.libraryUpdateRestriction key = Keys.libraryUpdateRestriction
titleRes = R.string.pref_library_update_restriction titleRes = R.string.library_update_restriction
entriesRes = arrayOf(R.string.wifi, R.string.charging) entriesRes = arrayOf(R.string.wifi, R.string.charging)
entryValues = listOf("wifi", "ac") entryValues = listOf("wifi", "ac")
customSummaryRes = R.string.pref_library_update_restriction_summary customSummaryRes = R.string.library_update_restriction_summary
preferences.libraryUpdateInterval().asObservable() preferences.libraryUpdateInterval().asObservable()
.subscribeUntilDestroy { isVisible = it > 0 } .subscribeUntilDestroy { isVisible = it > 0 }
@ -132,12 +124,12 @@ class SettingsLibraryController : SettingsController() {
intListPreference(activity) { intListPreference(activity) {
key = Keys.libraryUpdatePrioritization key = Keys.libraryUpdatePrioritization
titleRes = R.string.pref_library_update_prioritization titleRes = R.string.library_update_order
// The following array lines up with the list rankingScheme in: // The following array lines up with the list rankingScheme in:
// ../../data/library/LibraryUpdateRanker.kt // ../../data/library/LibraryUpdateRanker.kt
entriesRes = arrayOf( entriesRes = arrayOf(
R.string.action_sort_alpha, R.string.action_sort_last_updated R.string.alphabetically, R.string.last_updated
) )
entryRange = 0..1 entryRange = 0..1
defaultValue = 0 defaultValue = 0
@ -146,8 +138,8 @@ class SettingsLibraryController : SettingsController() {
switchPreference { switchPreference {
key = Keys.refreshCoversToo key = Keys.refreshCoversToo
titleRes = R.string.pref_refresh_covers_too titleRes = R.string.auto_refresh_covers
summaryRes = R.string.pref_refresh_covers_too_summary summaryRes = R.string.auto_refresh_covers_summary
defaultValue = true defaultValue = true
} }
@ -171,7 +163,7 @@ class SettingsLibraryController : SettingsController() {
} }
if (preferences.skipPreMigration().getOrDefault() || preferences.migrationSources().getOrDefault().isNotEmpty()) { if (preferences.skipPreMigration().getOrDefault() || preferences.migrationSources().getOrDefault().isNotEmpty()) {
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_category_library_migration titleRes = R.string.migration
// Only show this if someone has mass migrated manga once // Only show this if someone has mass migrated manga once
switchPreference { switchPreference {
@ -183,47 +175,4 @@ class SettingsLibraryController : SettingsController() {
} }
} }
} }
class LibraryColumnsDialog : DialogController() {
private val preferences: PreferencesHelper = Injekt.get()
private var portrait = preferences.portraitColumns().getOrDefault()
private var landscape = preferences.landscapeColumns().getOrDefault()
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val dialog = MaterialDialog(activity!!)
.title(R.string.pref_library_columns)
.customView(viewRes = R.layout.pref_library_columns, scrollable = false)
.positiveButton(android.R.string.ok) {
preferences.portraitColumns().set(portrait)
preferences.landscapeColumns().set(landscape)
}
.negativeButton(android.R.string.cancel)
onViewCreated(dialog.view)
return dialog
}
fun onViewCreated(view: View) {
with(view.portrait_columns) {
displayedValues = arrayOf(context.getString(R.string.default_columns)) +
IntRange(1, 10).map(Int::toString)
value = portrait
setOnValueChangedListener { _, _, newValue ->
portrait = newValue
}
}
with(view.landscape_columns) {
displayedValues = arrayOf(context.getString(R.string.default_columns)) +
IntRange(1, 10).map(Int::toString)
value = landscape
setOnValueChangedListener { _, _, newValue ->
landscape = newValue
}
}
}
}
} }

View File

@ -19,44 +19,44 @@ class SettingsMainController : SettingsController() {
} }
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.label_settings titleRes = R.string.settings
val tintColor = context.getResourceColor(R.attr.colorAccent) val tintColor = context.getResourceColor(R.attr.colorAccent)
preference { preference {
iconRes = R.drawable.ic_tune_white_24dp iconRes = R.drawable.ic_tune_white_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_general titleRes = R.string.general
onClick { navigateTo(SettingsGeneralController()) } onClick { navigateTo(SettingsGeneralController()) }
} }
preference { preference {
iconRes = R.drawable.ic_book_black_24dp iconRes = R.drawable.ic_book_black_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_library titleRes = R.string.library
onClick { navigateTo(SettingsLibraryController()) } onClick { navigateTo(SettingsLibraryController()) }
} }
preference { preference {
iconRes = R.drawable.ic_read_24dp iconRes = R.drawable.ic_read_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_reader titleRes = R.string.reader
onClick { navigateTo(SettingsReaderController()) } onClick { navigateTo(SettingsReaderController()) }
} }
preference { preference {
iconRes = R.drawable.ic_file_download_black_24dp iconRes = R.drawable.ic_file_download_black_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_downloads titleRes = R.string.downloads
onClick { navigateTo(SettingsDownloadController()) } onClick { navigateTo(SettingsDownloadController()) }
} }
preference { preference {
iconRes = R.drawable.ic_swap_calls_white_24dp iconRes = R.drawable.ic_swap_calls_white_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.label_migration titleRes = R.string.source_migration
onClick { navigateTo(MigrationController()) } onClick { navigateTo(MigrationController()) }
} }
preference { preference {
iconRes = R.drawable.ic_sync_black_24dp iconRes = R.drawable.ic_sync_black_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_tracking titleRes = R.string.tracking
onClick { navigateTo(SettingsTrackingController()) } onClick { navigateTo(SettingsTrackingController()) }
} }
preference { preference {
@ -68,13 +68,13 @@ class SettingsMainController : SettingsController() {
preference { preference {
iconRes = R.drawable.ic_code_black_24dp iconRes = R.drawable.ic_code_black_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_advanced titleRes = R.string.advanced
onClick { navigateTo(SettingsAdvancedController()) } onClick { navigateTo(SettingsAdvancedController()) }
} }
preference { preference {
iconRes = R.drawable.ic_info_black_24dp iconRes = R.drawable.ic_info_black_24dp
iconTint = tintColor iconTint = tintColor
titleRes = R.string.pref_category_about titleRes = R.string.about
onClick { navigateTo(SettingsAboutController()) } onClick { navigateTo(SettingsAboutController()) }
} }
} }

View File

@ -8,11 +8,11 @@ import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
class SettingsReaderController : SettingsController() { class SettingsReaderController : SettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_reader titleRes = R.string.reader
intListPreference(activity) { intListPreference(activity) {
key = Keys.defaultViewer key = Keys.defaultViewer
titleRes = R.string.pref_viewer_type titleRes = R.string.default_viewer
entriesRes = arrayOf(R.string.left_to_right_viewer, R.string.right_to_left_viewer, entriesRes = arrayOf(R.string.left_to_right_viewer, R.string.right_to_left_viewer,
R.string.vertical_viewer, R.string.webtoon) R.string.vertical_viewer, R.string.webtoon)
entryRange = 1..4 entryRange = 1..4
@ -20,76 +20,76 @@ class SettingsReaderController : SettingsController() {
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.imageScaleType key = Keys.imageScaleType
titleRes = R.string.pref_image_scale_type titleRes = R.string.scale_type
entriesRes = arrayOf(R.string.scale_type_fit_screen, R.string.scale_type_stretch, entriesRes = arrayOf(R.string.fit_screen, R.string.stretch,
R.string.scale_type_fit_width, R.string.scale_type_fit_height, R.string.fit_width, R.string.fit_height,
R.string.scale_type_original_size, R.string.scale_type_smart_fit) R.string.original_size, R.string.smart_fit)
entryRange = 1..6 entryRange = 1..6
defaultValue = 1 defaultValue = 1
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.zoomStart key = Keys.zoomStart
titleRes = R.string.pref_zoom_start titleRes = R.string.zoom_start_position
entriesRes = arrayOf(R.string.zoom_start_automatic, R.string.zoom_start_left, entriesRes = arrayOf(R.string.automatic, R.string.left,
R.string.zoom_start_right, R.string.zoom_start_center) R.string.right, R.string.center)
entryRange = 1..4 entryRange = 1..4
defaultValue = 1 defaultValue = 1
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.rotation key = Keys.rotation
titleRes = R.string.pref_rotation_type titleRes = R.string.rotation
entriesRes = arrayOf(R.string.rotation_free, R.string.rotation_lock, entriesRes = arrayOf(R.string.free, R.string.lock,
R.string.rotation_force_portrait, R.string.rotation_force_landscape) R.string.force_portrait, R.string.force_landscape)
entryRange = 1..4 entryRange = 1..4
defaultValue = 1 defaultValue = 1
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.readerTheme key = Keys.readerTheme
titleRes = R.string.pref_reader_theme titleRes = R.string.background_color
entriesRes = arrayOf(R.string.white_background, R.string.black_background, R.string entriesRes = arrayOf(R.string.white, R.string.black, R.string
.reader_theme_smart, R.string.reader_theme_smart_theme) .smart_based_on_page, R.string.smart_based_on_page_and_theme)
entryRange = 0..3 entryRange = 0..3
defaultValue = 2 defaultValue = 2
} }
intListPreference(activity) { intListPreference(activity) {
key = Keys.doubleTapAnimationSpeed key = Keys.doubleTapAnimationSpeed
titleRes = R.string.pref_double_tap_anim_speed titleRes = R.string.double_tap_anim_speed
entries = listOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R entries = listOf(context.getString(R.string.no_animation), context.getString(R
.string.double_tap_anim_speed_fast), context.getString(R.string.double_tap_anim_speed_normal)) .string.fast), context.getString(R.string.normal))
entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so
// min is 1 // min is 1
defaultValue = 500 defaultValue = 500
} }
switchPreference { switchPreference {
key = Keys.skipRead key = Keys.skipRead
titleRes = R.string.pref_skip_read_chapters titleRes = R.string.skip_read_chapters
defaultValue = false defaultValue = false
} }
switchPreference { switchPreference {
key = Keys.fullscreen key = Keys.fullscreen
titleRes = R.string.pref_fullscreen titleRes = R.string.fullscreen
defaultValue = true defaultValue = true
} }
switchPreference { switchPreference {
key = Keys.keepScreenOn key = Keys.keepScreenOn
titleRes = R.string.pref_keep_screen_on titleRes = R.string.keep_screen_on
defaultValue = true defaultValue = true
} }
switchPreference { switchPreference {
key = Keys.showPageNumber key = Keys.showPageNumber
titleRes = R.string.pref_show_page_number titleRes = R.string.show_page_number
defaultValue = true defaultValue = true
} }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference { switchPreference {
key = Keys.trueColor key = Keys.trueColor
titleRes = R.string.pref_true_color titleRes = R.string.true_32bit_color
defaultValue = false defaultValue = false
} }
} }
switchPreference { switchPreference {
key = Keys.alwaysShowChapterTransition key = Keys.alwaysShowChapterTransition
titleRes = R.string.pref_always_show_chapter_transition titleRes = R.string.always_show_chapter_transition
defaultValue = true defaultValue = true
} }
@ -98,12 +98,12 @@ class SettingsReaderController : SettingsController() {
switchPreference { switchPreference {
key = Keys.enableTransitions key = Keys.enableTransitions
titleRes = R.string.pref_page_transitions titleRes = R.string.page_transitions
defaultValue = true defaultValue = true
} }
switchPreference { switchPreference {
key = Keys.cropBorders key = Keys.cropBorders
titleRes = R.string.pref_crop_borders titleRes = R.string.crop_borders
defaultValue = false defaultValue = false
} }
} }
@ -112,31 +112,31 @@ class SettingsReaderController : SettingsController() {
switchPreference { switchPreference {
key = Keys.cropBordersWebtoon key = Keys.cropBordersWebtoon
titleRes = R.string.pref_crop_borders titleRes = R.string.crop_borders
defaultValue = false defaultValue = false
} }
} }
preferenceCategory { preferenceCategory {
titleRes = R.string.pref_reader_navigation titleRes = R.string.navigation
switchPreference { switchPreference {
key = Keys.readWithTapping key = Keys.readWithTapping
titleRes = R.string.pref_read_with_tapping titleRes = R.string.tapping
defaultValue = true defaultValue = true
} }
switchPreference { switchPreference {
key = Keys.readWithLongTap key = Keys.readWithLongTap
titleRes = R.string.pref_read_with_long_tap titleRes = R.string.long_tap_dialog
defaultValue = true defaultValue = true
} }
switchPreference { switchPreference {
key = Keys.readWithVolumeKeys key = Keys.readWithVolumeKeys
titleRes = R.string.pref_read_with_volume_keys titleRes = R.string.volume_keys
defaultValue = false defaultValue = false
} }
switchPreference { switchPreference {
key = Keys.readWithVolumeKeysInverted key = Keys.readWithVolumeKeysInverted
titleRes = R.string.pref_read_with_volume_keys_inverted titleRes = R.string.invert_volume_keys
defaultValue = false defaultValue = false
}.apply { dependency = Keys.readWithVolumeKeys } }.apply { dependency = Keys.readWithVolumeKeys }
} }

View File

@ -39,7 +39,7 @@ class SettingsSourcesController : SettingsController(),
private var sorting = SourcesSort.Alpha private var sorting = SourcesSort.Alpha
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.action_filter titleRes = R.string.filter
sorting = SourcesSort.from(preferences.sourceSorting().getOrDefault()) ?: SourcesSort.Alpha sorting = SourcesSort.from(preferences.sourceSorting().getOrDefault()) ?: SourcesSort.Alpha
activity?.invalidateOptionsMenu() activity?.invalidateOptionsMenu()
// Get the list of active language codes. // Get the list of active language codes.
@ -93,7 +93,7 @@ class SettingsSourcesController : SettingsController(),
val selectAllPreference = CheckBoxPreference(group.context).apply { val selectAllPreference = CheckBoxPreference(group.context).apply {
title = "\t\t${context.getString(R.string.pref_category_all_sources)}" title = "\t\t${context.getString(R.string.all_sources)}"
key = "all_${sources.first().lang}" key = "all_${sources.first().lang}"
isPersistent = false isPersistent = false
isChecked = sources.all { it.id.toString() !in hiddenCatalogues } isChecked = sources.all { it.id.toString() !in hiddenCatalogues }

View File

@ -22,7 +22,7 @@ class SettingsTrackingController : SettingsController(),
private val trackManager: TrackManager by injectLazy() private val trackManager: TrackManager by injectLazy()
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) { override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_tracking titleRes = R.string.tracking
switchPreference { switchPreference {
key = Keys.autoUpdateTrack key = Keys.autoUpdateTrack

View File

@ -31,7 +31,6 @@ import eu.kanade.tachiyomi.util.view.setStyle
import eu.kanade.tachiyomi.util.view.updateLayoutParams import eu.kanade.tachiyomi.util.view.updateLayoutParams
import eu.kanade.tachiyomi.util.view.updatePadding import eu.kanade.tachiyomi.util.view.updatePadding
import eu.kanade.tachiyomi.util.view.visible import eu.kanade.tachiyomi.util.view.visible
import kotlinx.android.synthetic.main.library_list_controller.*
import kotlinx.android.synthetic.main.webview_activity.* import kotlinx.android.synthetic.main.webview_activity.*
import kotlinx.android.synthetic.main.webview_activity.swipe_refresh import kotlinx.android.synthetic.main.webview_activity.swipe_refresh
import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.injectLazy
@ -277,7 +276,7 @@ class WebViewActivity : BaseActivity() {
type = "text/plain" type = "text/plain"
putExtra(Intent.EXTRA_TEXT, webview.url) putExtra(Intent.EXTRA_TEXT, webview.url)
} }
startActivity(Intent.createChooser(intent, getString(R.string.action_share))) startActivity(Intent.createChooser(intent, getString(R.string.share)))
} catch (e: Exception) { } catch (e: Exception) {
toast(e.message) toast(e.message)
} }

View File

@ -55,8 +55,8 @@ object LocaleHelper {
fun getDisplayName(lang: String?, context: Context): String { fun getDisplayName(lang: String?, context: Context): String {
return when (lang) { return when (lang) {
null -> "" null -> ""
"" -> context.getString(R.string.other_source) "" -> context.getString(R.string.other)
"all" -> context.getString(R.string.all_lang) "all" -> context.getString(R.string.all)
else -> { else -> {
val locale = getLocale(lang) val locale = getLocale(lang)
locale.getDisplayName(locale).capitalize() locale.getDisplayName(locale).capitalize()

View File

@ -20,7 +20,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle =
constructor(source: Source) : this(Bundle().apply { putLong("key", source.id) }) constructor(source: Source) : this(Bundle().apply { putLong("key", source.id) })
override fun setCredentialsOnView(view: View) = with(view) { override fun setCredentialsOnView(view: View) = with(view) {
dialog_title.text = context.getString(R.string.login_title, source.toString()) dialog_title.text = context.getString(R.string.log_in_to_, source.toString())
username.setText(preferences.sourceUsername(source)) username.setText(preferences.sourceUsername(source))
password.setText(preferences.sourcePassword(source)) password.setText(preferences.sourcePassword(source))
} }
@ -44,7 +44,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle =
password.text.toString()) password.text.toString())
dialog?.dismiss() dialog?.dismiss()
context.toast(R.string.login_success) context.toast(R.string.successfully_logged_in)
} else { } else {
preferences.setSourceCredentials(source, "", "") preferences.setSourceCredentials(source, "", "")
login.progress = -1 login.progress = -1

View File

@ -24,7 +24,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
this(usernameLabel, Bundle().apply { putInt("key", service.id) }) this(usernameLabel, Bundle().apply { putInt("key", service.id) })
override fun setCredentialsOnView(view: View) = with(view) { override fun setCredentialsOnView(view: View) = with(view) {
dialog_title.text = context.getString(R.string.login_title, service.name) dialog_title.text = context.getString(R.string.log_in_to_, service.name)
username.setText(service.getUsername()) username.setText(service.getUsername())
password.setText(service.getPassword()) password.setText(service.getPassword())
} }
@ -44,19 +44,19 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
val result = service.login(user, pass) val result = service.login(user, pass)
if (result) { if (result) {
dialog?.dismiss() dialog?.dismiss()
context.toast(R.string.login_success) context.toast(R.string.successfully_logged_in)
} else { } else {
errorResult(this@apply) errorResult()
} }
} catch (error: Exception) { } catch (error: Exception) {
errorResult(this@apply) errorResult()
error.message?.let { context.toast(it) } error.message?.let { context.toast(it) }
} }
} }
} }
} }
fun errorResult(view: View?) { private fun errorResult() {
v?.apply { v?.apply {
login.progress = -1 login.progress = -1
login.setText(R.string.unknown_error) login.setText(R.string.unknown_error)
@ -66,7 +66,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
override fun logout() { override fun logout() {
if (service.isLogged) { if (service.isLogged) {
service.logout() service.logout()
activity?.toast(R.string.logout_success) activity?.toast(R.string.successfully_logged_out)
} }
} }

View File

@ -1,264 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="eu.kanade.tachiyomi.ui.catalogue.browse.BrowseCatalogueController"
android:id="@id/swipe_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/manga_info_layout">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_favorite"
style="@style/Theme.Widget.FABFixed"
app:srcCompat="@drawable/ic_bookmark_border_white_24dp"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_anchorGravity=""/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/manga_cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:contentDescription="@string/description_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintDimensionRatio="h,3:2"
tools:background="@color/material_grey_700"
app:layout_constraintVertical_bias="0.0" />
<androidx.core.widget.NestedScrollView
android:id="@+id/info_scrollview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/manga_cover"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:clipToPadding="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="@string/manga_info_full_title_label"
android:id="@+id/manga_full_title"
style="@style/TextAppearance.Medium.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:textIsSelectable="false"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:autoSizeTextType="uniform"
app:autoSizeMinTextSize="12sp"
app:autoSizeMaxTextSize="20sp"
app:autoSizeStepGranularity="2sp"/>
<TextView
android:id="@+id/manga_author_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_author_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_full_title"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_author"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_author_label"
app:layout_constraintStart_toEndOf="@+id/manga_author_label"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_artist_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_artist_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_author_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_artist"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_artist_label"
app:layout_constraintStart_toEndOf="@+id/manga_artist_label"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_chapters_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_last_chapter_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_artist_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_chapters"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_chapters_label"
app:layout_constraintStart_toEndOf="@+id/manga_chapters_label"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_latest_data_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_chapters_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_status"
app:layout_constraintStart_toEndOf="@+id/manga_status"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_status_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_status_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_status"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_status_label"
app:layout_constraintStart_toEndOf="@+id/manga_status_label"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_source_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_source_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_status_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_source"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_source_label"
app:layout_constraintStart_toEndOf="@+id/manga_source_label"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/manga_summary_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/description"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_source"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_summary"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_summary_label"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="64dp"/>
<me.gujun.android.taggroup.TagGroup
android:id="@+id/manga_genres_tags"
style="@style/TagGroup"
android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/manga_summary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:atg_borderStrokeWidth="1dp"
app:atg_backgroundColor="@android:color/transparent"
app:atg_borderColor="@color/md_blue_A400"
app:atg_textColor="@color/md_blue_A400"
android:layout_marginEnd="64dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -4,6 +4,6 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_auto_check_extensions"> android:text="@string/notify_extension_updates">
</com.google.android.material.checkbox.MaterialCheckBox> </com.google.android.material.checkbox.MaterialCheckBox>

View File

@ -28,7 +28,7 @@
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
app:backgroundTint="?colorAccent" app:backgroundTint="?colorAccent"
android:text="@string/action_filter" android:text="@string/filter"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
app:icon="@drawable/ic_filter_list_white_24dp" app:icon="@drawable/ic_filter_list_white_24dp"
app:iconTint="@color/md_white_1000" app:iconTint="@color/md_white_1000"

View File

@ -34,7 +34,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:textColor="?attr/tabBarIconColor" android:textColor="?attr/tabBarIconColor"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/action_reset" android:text="@string/reset"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -33,7 +33,7 @@
style="@style/Theme.Widget.Button.Borderless.Small" style="@style/Theme.Widget.Button.Borderless.Small"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/update_check_look_for_updates" android:text="@string/searching_for_updates"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"/> app:layout_constraintTop_toTopOf="parent"/>

View File

@ -16,11 +16,4 @@
android:clipToPadding="false" android:clipToPadding="false"
tools:listitem="@layout/categories_item" /> tools:listitem="@layout/categories_item" />
<eu.kanade.tachiyomi.widget.EmptyView
android:id="@+id/empty_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -31,14 +31,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="12dp" android:paddingEnd="12dp"
android:text="@string/action_sort" /> android:text="@string/sort" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/set_as_default_sort" android:id="@+id/set_as_default_sort"
style="@style/Theme.Widget.Button.TextButton" style="@style/Theme.Widget.Button.TextButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/set_as_default" /> android:text="@string/set_as_default_for_all" />
</LinearLayout> </LinearLayout>
<RadioGroup <RadioGroup
@ -72,7 +72,7 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="12dp" android:paddingEnd="12dp"
android:text="@string/action_filter" /> android:text="@string/filter" />
<com.google.android.material.checkbox.MaterialCheckBox <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/show_all" android:id="@+id/show_all"
@ -164,7 +164,7 @@
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:background="@drawable/round_ripple" android:background="@drawable/round_ripple"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/action_close" android:contentDescription="@string/close"
android:focusable="true" android:focusable="true"
android:src="@drawable/ic_close_white_24dp" android:src="@drawable/ic_close_white_24dp"
android:tint="@color/gray_button" /> android:tint="@color/gray_button" />

View File

@ -39,19 +39,19 @@
<com.google.android.material.radiobutton.MaterialRadioButton <com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/action_display_list" /> android:text="@string/list" />
<com.google.android.material.radiobutton.MaterialRadioButton <com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:text="@string/action_display_grid" /> android:text="@string/compact_grid" />
<com.google.android.material.radiobutton.MaterialRadioButton <com.google.android.material.radiobutton.MaterialRadioButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:text="@string/action_display_comfy_grid" /> android:text="@string/comfortable_grid" />
</RadioGroup> </RadioGroup>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
@ -95,7 +95,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:text="@string/uniform_grid" /> android:text="@string/uniform_covers" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
style="@style/TextAppearance.MaterialComponents.Headline6" style="@style/TextAppearance.MaterialComponents.Headline6"
@ -104,7 +104,7 @@
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="12dp" android:paddingEnd="12dp"
android:text="@string/action_display_unread_badge" /> android:text="@string/unread_badges" />
<RadioGroup <RadioGroup
android:id="@+id/unread_badge_group" android:id="@+id/unread_badge_group"
@ -150,7 +150,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:text="@string/action_display_download_badge" /> android:text="@string/download_badge" />
<com.google.android.material.checkbox.MaterialCheckBox <com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/autohide_seeker" android:id="@+id/autohide_seeker"
@ -166,7 +166,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:text="@string/action_start_filters_hidden" /> android:text="@string/start_with_filters_hidden" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
@ -179,7 +179,7 @@
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:background="@drawable/round_ripple" android:background="@drawable/round_ripple"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/action_close" android:contentDescription="@string/close"
android:focusable="true" android:focusable="true"
android:src="@drawable/ic_close_white_24dp" android:src="@drawable/ic_close_white_24dp"
android:tint="@color/gray_button" /> android:tint="@color/gray_button" />

View File

@ -18,7 +18,7 @@
android:layout_height="24dp" android:layout_height="24dp"
android:tint="@color/md_white_1000" android:tint="@color/md_white_1000"
android:layout_gravity="end|center" android:layout_gravity="end|center"
android:contentDescription="@string/action_cancel" android:contentDescription="@string/cancel"
android:layout_marginEnd="21dp" android:layout_marginEnd="21dp"
android:src="@drawable/ic_close_white_24dp" /> android:src="@drawable/ic_close_white_24dp" />
</FrameLayout> </FrameLayout>
@ -34,7 +34,7 @@
android:id="@+id/close_left" android:id="@+id/close_left"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:contentDescription="@string/action_cancel" android:contentDescription="@string/cancel"
android:layout_gravity="start|center" android:layout_gravity="start|center"
android:layout_marginStart="21dp" android:layout_marginStart="21dp"
android:tint="@color/md_white_1000" android:tint="@color/md_white_1000"
@ -53,7 +53,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_gravity="start" android:layout_gravity="start"
android:contentDescription="@string/action_reorganize_by" android:contentDescription="@string/reorder"
android:scaleType="center" android:scaleType="center"
android:tint="?android:attr/textColorPrimary" android:tint="?android:attr/textColorPrimary"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -120,7 +120,7 @@
android:layout_width="44dp" android:layout_width="44dp"
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height"
android:layout_toEndOf="@id/download_progress_text" android:layout_toEndOf="@id/download_progress_text"
android:contentDescription="@string/description_cover" android:contentDescription="@string/cover_of_image"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"

View File

@ -17,7 +17,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:layout_height="150dp" android:layout_height="150dp"
android:contentDescription="@string/description_cover" android:contentDescription="@string/cover_of_image"
android:background="@drawable/image_border_background" android:background="@drawable/image_border_background"
android:src="@mipmap/ic_launcher"/> android:src="@mipmap/ic_launcher"/>
</FrameLayout> </FrameLayout>
@ -35,7 +35,7 @@
android:id="@+id/manga_author" android:id="@+id/manga_author"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/manga_info_author_label" android:hint="@string/author"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:inputType="text" android:inputType="text"
@ -45,7 +45,7 @@
android:id="@+id/manga_artist" android:id="@+id/manga_artist"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/manga_info_artist_label" android:hint="@string/artist"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:inputType="text" android:inputType="text"

View File

@ -85,7 +85,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:text="@string/ext_uninstall" android:text="@string/uninstall"
style="@style/Theme.Widget.Button.Colored" style="@style/Theme.Widget.Button.Colored"
app:layout_constraintStart_toStartOf="@id/guideline" app:layout_constraintStart_toStartOf="@id/guideline"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -53,7 +53,7 @@
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:background="@drawable/round_clear_border" android:background="@drawable/round_clear_border"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/action_clear" android:contentDescription="@string/clear"
android:focusable="true" android:focusable="true"
android:padding="3dp" android:padding="3dp"
android:src="@drawable/ic_close_white_24dp" android:src="@drawable/ic_close_white_24dp"
@ -73,14 +73,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:text="@string/action_hide_categories" /> android:text="@string/hide_categories" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/view_options" android:id="@+id/view_options"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/Theme.Widget.Button.TextButton" style="@style/Theme.Widget.Button.TextButton"
android:text="@string/action_view_options" android:text="@string/display_options"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
app:icon="@drawable/ic_tune_white_24dp" app:icon="@drawable/ic_tune_white_24dp"
app:iconTint="?android:attr/textColorPrimary" app:iconTint="?android:attr/textColorPrimary"
@ -92,7 +92,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" android:visibility="gone"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:text="@string/action_start_filters_hidden" /> android:text="@string/start_with_filters_hidden" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -14,7 +14,7 @@
tools:visibility="visible" tools:visibility="visible"
tools:tint="?attr/colorAccent" tools:tint="?attr/colorAccent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:contentDescription="@string/action_select_all" android:contentDescription="@string/select_all"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -87,6 +87,6 @@
android:elevation="10dp" android:elevation="10dp"
android:translationZ="20dp" android:translationZ="20dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:contentDescription="@string/description_cover" android:contentDescription="@string/cover_of_image"
android:visibility="invisible" /> android:visibility="invisible" />
</FrameLayout> </FrameLayout>

View File

@ -72,7 +72,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/description_cover" android:contentDescription="@string/cover_of_image"
android:focusable="true" android:focusable="true"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
android:maxHeight="300dp" android:maxHeight="300dp"
@ -90,7 +90,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="4" android:maxLines="4"
android:text="@string/manga_info_full_title_label" android:text="@string/title"
android:textIsSelectable="false" android:textIsSelectable="false"
android:textSize="20sp" android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -105,7 +105,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="2" android:maxLines="2"
android:text="@string/manga_info_author_label" android:text="@string/author"
android:textAppearance="@style/TextAppearance.Regular.Body1.SemiBold" android:textAppearance="@style/TextAppearance.Regular.Body1.SemiBold"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:textIsSelectable="false" android:textIsSelectable="false"
@ -119,7 +119,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:text="@string/manga_info_latest_data_label" android:text="@string/updated"
android:textIsSelectable="false" android:textIsSelectable="false"
app:layout_constraintStart_toStartOf="@id/manga_full_title" app:layout_constraintStart_toStartOf="@id/manga_full_title"
app:layout_constraintTop_toBottomOf="@+id/manga_author" app:layout_constraintTop_toBottomOf="@+id/manga_author"
@ -171,7 +171,7 @@
android:id="@+id/track_button" android:id="@+id/track_button"
style="@style/Theme.Widget.Button.RounededOutline" style="@style/Theme.Widget.Button.RounededOutline"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:text="@string/manga_tracking_tab" android:text="@string/tracking"
app:icon="@drawable/ic_sync_black_24dp" /> app:icon="@drawable/ic_sync_black_24dp" />
@ -183,10 +183,10 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="6dp" android:layout_marginStart="6dp"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:contentDescription="@string/action_open_in_web_view" android:contentDescription="@string/open_in_web_view"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/ic_open_in_webview_white_24dp" android:src="@drawable/ic_open_in_webview_white_24dp"
android:tooltipText="@string/action_open_in_web_view" /> android:tooltipText="@string/open_in_web_view" />
<ImageView <ImageView
android:id="@+id/share_button" android:id="@+id/share_button"
@ -196,10 +196,10 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:contentDescription="@string/action_share" android:contentDescription="@string/share"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/ic_share_white_24dp" android:src="@drawable/ic_share_white_24dp"
android:tooltipText="@string/action_share" /> android:tooltipText="@string/share" />
</LinearLayout> </LinearLayout>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
@ -345,7 +345,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:tooltipText="@string/action_sort_and_filter" android:tooltipText="@string/sort_and_filter"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:background="?selectable_list_drawable" android:background="?selectable_list_drawable"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -1,328 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="eu.kanade.tachiyomi.ui.catalogue.browse.BrowseCatalogueController"
android:id="@id/swipe_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/manga_info_layout">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/guideline"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_cover" />
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/guideline2"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.38"/>
<ImageView
android:id="@+id/backdrop"
android:layout_width="0dp"
android:layout_height="0dp"
android:alpha="0.2"
tools:background="@color/material_grey_700"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<ImageView
android:id="@+id/manga_cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/description_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintDimensionRatio="h,2:3"
tools:background="@color/material_grey_700"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_favorite"
style="@style/Theme.Widget.FAB"
app:srcCompat="@drawable/ic_add_to_library_24dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@+id/guideline"
app:layout_constraintBottom_toTopOf="@+id/guideline"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.core.widget.NestedScrollView
android:id="@+id/info_scrollview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:paddingTop="16dp"
android:paddingBottom="20dp"
android:clipToPadding="false"
app:layout_constraintBottom_toBottomOf="@+id/backdrop"
app:layout_constraintLeft_toLeftOf="@+id/guideline2"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/manga_full_title"
style="@style/TextAppearance.Medium.Title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/manga_info_full_title_label"
android:textIsSelectable="false"
app:autoSizeMaxTextSize="20sp"
app:autoSizeMinTextSize="12sp"
app:autoSizeStepGranularity="2sp"
app:autoSizeTextType="uniform"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/manga_author_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_author_label"
android:textIsSelectable="false"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/manga_full_title" />
<TextView
android:id="@+id/manga_author"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_author_label"
app:layout_constraintStart_toEndOf="@+id/manga_author_label"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/manga_artist_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_artist_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_author_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_artist"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_artist_label"
app:layout_constraintStart_toEndOf="@+id/manga_artist_label"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/manga_chapters_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_last_chapter_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_artist_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_chapters"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_chapters_label"
app:layout_constraintStart_toEndOf="@+id/manga_chapters_label"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_latest_data_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_chapters_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_status"
app:layout_constraintStart_toEndOf="@+id/manga_status"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/manga_status_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_status_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_status"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_status_label"
app:layout_constraintStart_toEndOf="@+id/manga_status_label"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:id="@+id/manga_source_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_info_source_label"
android:textIsSelectable="false"
app:layout_constraintTop_toBottomOf="@+id/manga_status_label"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/manga_source"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintBaseline_toBaselineOf="@+id/manga_source_label"
app:layout_constraintStart_toEndOf="@+id/manga_source_label"
app:layout_constraintEnd_toEndOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
<TextView
android:id="@+id/manga_summary_label"
style="@style/TextAppearance.Medium.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:text="@string/description"
app:layout_constraintTop_toBottomOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:textIsSelectable="false"/>
<androidx.core.widget.NestedScrollView
android:id="@+id/description_scrollview"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/manga_genres_tags"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/manga_summary_label"
app:layout_constraintVertical_bias="0.0"
app:layout_constraintVertical_chainStyle="packed">
<TextView
android:id="@+id/manga_summary"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:textIsSelectable="false" />
</androidx.core.widget.NestedScrollView>
<me.gujun.android.taggroup.TagGroup
android:id="@+id/manga_genres_tags"
style="@style/TagGroup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constrainedHeight="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/description_scrollview"
app:layout_constraintBottom_toBottomOf="parent"
app:atg_borderStrokeWidth="1dp"
app:atg_backgroundColor="@android:color/transparent"
app:atg_borderColor="@color/md_blue_A400"
app:atg_textColor="@color/md_blue_A400" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/full_backdrop"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
android:focusable="true"
android:alpha="0"
android:clickable="true"
android:foreground="@color/md_black_1000"
tools:background="@color/md_black_1000" />
<ImageView
android:id="@+id/manga_cover_full"
android:contentDescription="@string/description_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:visibility="invisible"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

Some files were not shown because too many files have changed in this diff Show More