mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
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:
parent
4828f934b5
commit
fb529f52d3
@ -5,8 +5,8 @@
|
||||
android:icon="@drawable/sc_update_48dp"
|
||||
android:shortcutDisabledMessage="@string/app_not_available"
|
||||
android:shortcutId="show_recently_updated"
|
||||
android:shortcutLongLabel="@string/label_recent_updates"
|
||||
android:shortcutShortLabel="@string/short_recent_updates">
|
||||
android:shortcutLongLabel="@string/recent_updates"
|
||||
android:shortcutShortLabel="@string/updates">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
|
||||
android:targetPackage="${applicationId}"
|
||||
@ -29,8 +29,8 @@
|
||||
android:icon="@drawable/sc_extensions_48dp"
|
||||
android:shortcutDisabledMessage="@string/app_not_available"
|
||||
android:shortcutId="show_extensions"
|
||||
android:shortcutLongLabel="@string/label_extensions"
|
||||
android:shortcutShortLabel="@string/label_extensions">
|
||||
android:shortcutLongLabel="@string/extensions"
|
||||
android:shortcutShortLabel="@string/extensions">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.EXTENSIONS"
|
||||
android:targetPackage="${applicationId}"
|
||||
|
@ -302,7 +302,7 @@ class BackupRestoreService : Service() {
|
||||
}
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
}
|
||||
@ -361,7 +361,7 @@ class BackupRestoreService : Service() {
|
||||
private fun showProgressNotification(current: Int, total: Int, title: String) {
|
||||
notificationManager.notify(Notifications.ID_RESTORE_PROGRESS, progressNotification
|
||||
.setContentTitle(title.chop(30))
|
||||
.setContentText(getString(R.string.backup_restoring_progress, restoreProgress,
|
||||
.setContentText(getString(R.string.restoring_progress, restoreProgress,
|
||||
totalAmount))
|
||||
.setProgress(total, current, false)
|
||||
.build())
|
||||
@ -387,7 +387,7 @@ class BackupRestoreService : Service() {
|
||||
content.add(trackingErrorsString)
|
||||
}
|
||||
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")
|
||||
|
||||
@ -400,7 +400,7 @@ class BackupRestoreService : Service() {
|
||||
.setColor(ContextCompat.getColor(this, R.color.colorAccent))
|
||||
if (errors.size > 0 && !path.isNullOrEmpty() && !file.isNullOrEmpty()) {
|
||||
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())
|
||||
}
|
||||
|
@ -42,12 +42,12 @@ interface Category : Serializable {
|
||||
|
||||
fun sortRes(): Int = when (mangaSort) {
|
||||
ALPHA_ASC, ALPHA_DSC -> R.string.title
|
||||
UPDATED_ASC, UPDATED_DSC -> R.string.action_sort_latest_chapter
|
||||
UNREAD_ASC, UNREAD_DSC -> R.string.action_filter_unread
|
||||
LAST_READ_ASC, LAST_READ_DSC -> R.string.action_sort_last_read
|
||||
TOTAL_ASC, TOTAL_DSC -> R.string.action_sort_total
|
||||
DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.action_date_added
|
||||
else -> R.string.action_sort_drag_and_drop
|
||||
UPDATED_ASC, UPDATED_DSC -> R.string.latest_chapter
|
||||
UNREAD_ASC, UNREAD_DSC -> R.string.unread
|
||||
LAST_READ_ASC, LAST_READ_DSC -> R.string.last_read
|
||||
TOTAL_ASC, TOTAL_DSC -> R.string.total_chapters
|
||||
DATE_ADDED_ASC, DATE_ADDED_DSC -> R.string.date_added
|
||||
else -> R.string.drag_and_drop
|
||||
}
|
||||
|
||||
fun catSortingMode(): Int? = when (mangaSort) {
|
||||
@ -92,7 +92,7 @@ interface Category : Serializable {
|
||||
}
|
||||
|
||||
fun createDefault(context: Context): Category =
|
||||
create(context.getString(R.string.default_columns)).apply {
|
||||
create(context.getString(R.string.default_value)).apply {
|
||||
id = 0
|
||||
isFirst = true
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
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.model.SManga
|
||||
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 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)
|
||||
*/
|
||||
|
@ -79,7 +79,7 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
isDownloading = true
|
||||
// Pause action
|
||||
addAction(R.drawable.ic_av_pause_grey_24dp_img,
|
||||
context.getString(R.string.action_pause),
|
||||
context.getString(R.string.pause),
|
||||
NotificationReceiver.pauseDownloadsPendingBroadcast(context))
|
||||
}
|
||||
|
||||
@ -90,12 +90,12 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
.toRegex(RegexOption.IGNORE_CASE), "")
|
||||
setContentTitle("$title - $chapter".chop(30))
|
||||
setContentText(
|
||||
context.getString(R.string.chapter_downloading)
|
||||
context.getString(R.string.downloading)
|
||||
)
|
||||
} else {
|
||||
setContentTitle(
|
||||
context.getString(
|
||||
R.string.chapter_downloading
|
||||
R.string.downloading
|
||||
)
|
||||
)
|
||||
setContentText(null)
|
||||
@ -125,7 +125,7 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
isDownloading = true
|
||||
// Pause action
|
||||
addAction(R.drawable.ic_av_pause_grey_24dp_img,
|
||||
context.getString(R.string.action_pause),
|
||||
context.getString(R.string.pause),
|
||||
NotificationReceiver.pauseDownloadsPendingBroadcast(context))
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
val quotedTitle = Pattern.quote(title)
|
||||
val chapter = download.chapter.name.replaceFirst("$quotedTitle[\\s]*[-]*[\\s]*".toRegex(RegexOption.IGNORE_CASE), "")
|
||||
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))
|
||||
setStyle(null)
|
||||
setProgress(download.pages!!.size, download.downloadedImages, false)
|
||||
@ -147,8 +147,8 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
*/
|
||||
fun onDownloadPaused() {
|
||||
with(notification) {
|
||||
setContentTitle(context.getString(R.string.chapter_paused))
|
||||
setContentText(context.getString(R.string.download_notifier_download_paused))
|
||||
setContentTitle(context.getString(R.string.paused))
|
||||
setContentText(context.getString(R.string.download_paused))
|
||||
setSmallIcon(R.drawable.ic_av_pause_grey_24dp_img)
|
||||
setAutoCancel(false)
|
||||
setProgress(0, 0, false)
|
||||
@ -158,13 +158,13 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
// Resume action
|
||||
addAction(
|
||||
R.drawable.ic_av_play_arrow_grey_img,
|
||||
context.getString(R.string.action_resume),
|
||||
context.getString(R.string.resume),
|
||||
NotificationReceiver.resumeDownloadsPendingBroadcast(context)
|
||||
)
|
||||
// Clear action
|
||||
addAction(
|
||||
R.drawable.ic_clear_grey_24dp_img,
|
||||
context.getString(R.string.action_cancel_all),
|
||||
context.getString(R.string.cancel_all),
|
||||
NotificationReceiver.clearDownloadsPendingBroadcast(context)
|
||||
)
|
||||
}
|
||||
@ -183,7 +183,7 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
*/
|
||||
fun onWarning(reason: String) {
|
||||
with(notification) {
|
||||
setContentTitle(context.getString(R.string.download_notifier_downloader_title))
|
||||
setContentTitle(context.getString(R.string.downloads))
|
||||
setContentText(reason)
|
||||
setSmallIcon(android.R.drawable.stat_sys_warning)
|
||||
setAutoCancel(true)
|
||||
@ -207,9 +207,9 @@ internal class DownloadNotifier(private val context: Context) {
|
||||
fun onError(error: String? = null, chapter: String? = null) {
|
||||
// Create notification
|
||||
with(notification) {
|
||||
setContentTitle(chapter ?: context.getString(R.string.download_notifier_downloader_title))
|
||||
setContentText(error ?: context.getString(R.string.download_notifier_unkown_error))
|
||||
setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.download_notifier_unkown_error)))
|
||||
setContentTitle(chapter ?: context.getString(R.string.download_error))
|
||||
setContentText(error ?: context.getString(R.string.could_not_download_unexpected_error))
|
||||
setStyle(NotificationCompat.BigTextStyle().bigText(error ?: context.getString(R.string.could_not_download_unexpected_error)))
|
||||
setSmallIcon(android.R.drawable.stat_sys_warning)
|
||||
setCategory(NotificationCompat.CATEGORY_ERROR)
|
||||
clearActions()
|
||||
|
@ -52,7 +52,7 @@ class DownloadProvider(private val context: Context) {
|
||||
return downloadsDir.createDirectory(getSourceDirName(source))
|
||||
.createDirectory(getMangaDirName(manga))
|
||||
} catch (e: NullPointerException) {
|
||||
throw Exception(context.getString(R.string.invalid_download_dir))
|
||||
throw Exception(context.getString(R.string.invalid_download_location))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ class DownloadService : Service() {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({ state -> onNetworkStateChanged(state)
|
||||
}, {
|
||||
toast(R.string.download_queue_error)
|
||||
toast(R.string.could_not_download_chapter_can_try_again)
|
||||
stopSelf()
|
||||
})
|
||||
}
|
||||
@ -177,14 +177,14 @@ class DownloadService : Service() {
|
||||
when (connectivity.state) {
|
||||
CONNECTED -> {
|
||||
if (preferences.downloadOnlyOverWifi() && connectivityManager.isActiveNetworkMetered) {
|
||||
downloadManager.stopDownloads(getString(R.string.download_notifier_text_only_wifi))
|
||||
downloadManager.stopDownloads(getString(R.string.no_wifi_connection))
|
||||
} else {
|
||||
val started = downloadManager.startDownloads()
|
||||
if (!started) stopSelf()
|
||||
}
|
||||
}
|
||||
DISCONNECTED -> {
|
||||
downloadManager.stopDownloads(getString(R.string.download_notifier_no_network))
|
||||
downloadManager.stopDownloads(getString(R.string.no_network_connection))
|
||||
}
|
||||
else -> { /* Do nothing */ }
|
||||
}
|
||||
@ -218,7 +218,7 @@ class DownloadService : Service() {
|
||||
|
||||
private fun getPlaceholderNotification(): Notification {
|
||||
return NotificationCompat.Builder(this, Notifications.CHANNEL_DOWNLOADER)
|
||||
.setContentTitle(getString(R.string.download_notifier_downloader_title))
|
||||
.setContentTitle(getString(R.string.downloading))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
@ -571,14 +571,14 @@ class LibraryUpdateService(
|
||||
)
|
||||
)
|
||||
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(
|
||||
this@LibraryUpdateService,
|
||||
manga, chapters, Notifications.ID_NEW_CHAPTERS
|
||||
)
|
||||
)
|
||||
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(
|
||||
this@LibraryUpdateService,
|
||||
manga, Notifications.ID_NEW_CHAPTERS
|
||||
@ -595,13 +595,13 @@ class LibraryUpdateService(
|
||||
notification(Notifications.CHANNEL_NEW_CHAPTERS) {
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setLargeIcon(notificationBitmap)
|
||||
setContentTitle(getString(R.string.notification_new_chapters))
|
||||
setContentTitle(getString(R.string.new_chapters_found))
|
||||
color = ContextCompat.getColor(applicationContext, R.color.colorAccent)
|
||||
if (updates.size > 1) {
|
||||
setContentText(
|
||||
resources.getQuantityString(
|
||||
R.plurals
|
||||
.notification_new_chapters_text,
|
||||
.for_n_titles,
|
||||
updates.size, updates.size
|
||||
)
|
||||
)
|
||||
|
@ -133,7 +133,7 @@ class NotificationReceiver : BroadcastReceiver() {
|
||||
}
|
||||
context.startActivity(intent)
|
||||
} else {
|
||||
context.toast(context.getString(R.string.no_next_chapter))
|
||||
context.toast(context.getString(R.string.next_chapter_not_found))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,31 +60,31 @@ object Notifications {
|
||||
|
||||
val channels = listOf(NotificationChannel(
|
||||
CHANNEL_COMMON,
|
||||
context.getString(R.string.channel_common),
|
||||
context.getString(R.string.common),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
), NotificationChannel(
|
||||
CHANNEL_LIBRARY,
|
||||
context.getString(R.string.channel_library_updates),
|
||||
context.getString(R.string.updating_library),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
).apply {
|
||||
setShowBadge(false)
|
||||
}, NotificationChannel(
|
||||
CHANNEL_DOWNLOADER,
|
||||
context.getString(R.string.channel_downloader),
|
||||
context.getString(R.string.downloads),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
).apply {
|
||||
setShowBadge(false)
|
||||
}, NotificationChannel(
|
||||
CHANNEL_UPDATES_TO_EXTS,
|
||||
context.getString(R.string.channel_ext_updates),
|
||||
context.getString(R.string.extension_updates),
|
||||
NotificationManager.IMPORTANCE_DEFAULT
|
||||
), NotificationChannel(
|
||||
CHANNEL_NEW_CHAPTERS,
|
||||
context.getString(R.string.channel_new_chapters),
|
||||
context.getString(R.string.new_chapters),
|
||||
NotificationManager.IMPORTANCE_DEFAULT
|
||||
), NotificationChannel(
|
||||
CHANNEL_RESTORE,
|
||||
context.getString(R.string.channel_backup_restore),
|
||||
context.getString(R.string.restoring_backup),
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
).apply {
|
||||
setShowBadge(false)
|
||||
|
@ -47,7 +47,7 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) {
|
||||
PAUSED -> getString(R.string.paused)
|
||||
DROPPED -> getString(R.string.dropped)
|
||||
PLANNING -> getString(R.string.plan_to_read)
|
||||
REPEATING -> getString(R.string.repeating)
|
||||
REPEATING -> getString(R.string.rereading)
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class Shikimori(private val context: Context, id: Int) : TrackService(id) {
|
||||
ON_HOLD -> getString(R.string.on_hold)
|
||||
DROPPED -> getString(R.string.dropped)
|
||||
PLANNING -> getString(R.string.plan_to_read)
|
||||
REPEATING -> getString(R.string.repeating)
|
||||
REPEATING -> getString(R.string.rereading)
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ class UpdaterJob : Job() {
|
||||
|
||||
NotificationCompat.Builder(context, Notifications.CHANNEL_COMMON).update {
|
||||
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)
|
||||
color = ContextCompat.getColor(context, R.color.colorAccent)
|
||||
// Download action
|
||||
addAction(
|
||||
android.R.drawable.stat_sys_download_done,
|
||||
context.getString(R.string.action_download),
|
||||
context.getString(R.string.download),
|
||||
PendingIntent.getService(
|
||||
context,
|
||||
0,
|
||||
|
@ -41,7 +41,7 @@ internal class UpdaterNotifier(private val context: Context) {
|
||||
fun onDownloadStarted(title: String) {
|
||||
with(notification) {
|
||||
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)
|
||||
setOngoing(true)
|
||||
}
|
||||
@ -68,18 +68,18 @@ internal class UpdaterNotifier(private val context: Context) {
|
||||
*/
|
||||
fun onDownloadFinished(uri: Uri) {
|
||||
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)
|
||||
setOnlyAlertOnce(false)
|
||||
setProgress(0, 0, false)
|
||||
// Install action
|
||||
setContentIntent(NotificationHandler.installApkPendingActivity(context, uri))
|
||||
addAction(R.drawable.ic_system_update_grey_24dp_img,
|
||||
context.getString(R.string.action_install),
|
||||
context.getString(R.string.install),
|
||||
NotificationHandler.installApkPendingActivity(context, uri))
|
||||
// Cancel action
|
||||
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))
|
||||
}
|
||||
notification.show()
|
||||
@ -92,18 +92,18 @@ internal class UpdaterNotifier(private val context: Context) {
|
||||
*/
|
||||
fun onDownloadError(url: String) {
|
||||
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)
|
||||
setOnlyAlertOnce(false)
|
||||
setProgress(0, 0, false)
|
||||
color = ContextCompat.getColor(context, R.color.colorAccent)
|
||||
// Retry action
|
||||
addAction(R.drawable.ic_refresh_grey_24dp_img,
|
||||
context.getString(R.string.action_retry),
|
||||
context.getString(R.string.retry),
|
||||
UpdaterService.downloadApkPendingService(context, url))
|
||||
// Cancel action
|
||||
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))
|
||||
}
|
||||
notification.show(Notifications.ID_UPDATER)
|
||||
|
@ -32,7 +32,7 @@ class ExtensionUpdateJob : Job() {
|
||||
context.notification(Notifications.CHANNEL_UPDATES_TO_EXTS) {
|
||||
setContentTitle(
|
||||
context.resources.getQuantityString(
|
||||
R.plurals.update_check_notification_ext_updates, names
|
||||
R.plurals.extension_update_available, names
|
||||
.size, names.size
|
||||
)
|
||||
)
|
||||
|
@ -158,10 +158,10 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
|
||||
if (!cloudflareBypassed) {
|
||||
// Prompt user to update WebView if it seems too outdated
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,11 @@ class LocalSource(private val context: Context) : CatalogueSource {
|
||||
}
|
||||
|
||||
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 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)
|
||||
|
||||
|
@ -68,7 +68,7 @@ open class SourceManager(private val context: Context) {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
|
@ -91,8 +91,8 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
|
||||
*/
|
||||
override fun getTitle(): String? {
|
||||
return if (showingExtenions)
|
||||
applicationContext?.getString(R.string.label_extensions)
|
||||
else applicationContext?.getString(R.string.pref_category_sources)
|
||||
applicationContext?.getString(R.string.extensions)
|
||||
else applicationContext?.getString(R.string.sources)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -312,7 +312,7 @@ class CatalogueController : NucleusController<CataloguePresenter>(),
|
||||
val searchView = searchItem.actionView as SearchView
|
||||
|
||||
// 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.
|
||||
setOnQueryTextChangeListener(searchView, true) {
|
||||
|
@ -382,7 +382,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
||||
snack?.dismiss()
|
||||
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) {
|
||||
setAction(R.string.action_retry) {
|
||||
setAction(R.string.retry) {
|
||||
// If not the first page, show bottom progress bar.
|
||||
if (adapter.mainItemCount > 0) {
|
||||
val item = progressItem ?: return@setAction
|
||||
@ -511,8 +511,8 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
||||
if (manga.favorite) {
|
||||
presenter.changeMangaFavorite(manga)
|
||||
adapter?.notifyItemChanged(position)
|
||||
snack = catalouge_layout?.snack(R.string.manga_removed_library, Snackbar.LENGTH_INDEFINITE) {
|
||||
setAction(R.string.action_undo) {
|
||||
snack = catalouge_layout?.snack(R.string.removed_from_library, Snackbar.LENGTH_INDEFINITE) {
|
||||
setAction(R.string.undo) {
|
||||
if (!manga.favorite) addManga(manga, position)
|
||||
}
|
||||
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
|
||||
@ -525,7 +525,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
||||
(activity as? MainActivity)?.setUndoSnackBar(snack)
|
||||
} else {
|
||||
addManga(manga, position)
|
||||
snack = catalouge_layout?.snack(R.string.manga_added_library)
|
||||
snack = catalouge_layout?.snack(R.string.added_to_library)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class CatalogueSearchSheet(activity: Activity) :
|
||||
init {
|
||||
val view = activity.layoutInflater.inflate(R.layout.catalogue_drawer_content, null)
|
||||
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() }
|
||||
reset_btn.setOnClickListener { onResetClicked() }
|
||||
/*view.search_layout.setOnApplyWindowInsetsListener { v, insets ->
|
||||
|
@ -47,7 +47,7 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
* Returns the toolbar title to show when this controller is attached.
|
||||
*/
|
||||
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>) {
|
||||
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!!)
|
||||
.title(R.string.confirm_category_deletion)
|
||||
.message(R.string.confirm_category_deletion_message)
|
||||
.positiveButton(R.string.action_delete) {
|
||||
.positiveButton(R.string.delete) {
|
||||
deleteCategory(position)
|
||||
}
|
||||
.negativeButton(android.R.string.no)
|
||||
@ -146,9 +141,9 @@ class CategoryController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
private fun deleteCategory(position: Int) {
|
||||
adapter?.removeItem(position)
|
||||
snack =
|
||||
view?.snack(R.string.snack_category_deleted, Snackbar.LENGTH_INDEFINITE) {
|
||||
view?.snack(R.string.category_deleted, Snackbar.LENGTH_INDEFINITE) {
|
||||
var undoing = false
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
adapter?.restoreDeletedItems()
|
||||
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.
|
||||
*/
|
||||
fun onCategoryExistsError() {
|
||||
activity?.toast(R.string.error_category_exists)
|
||||
activity?.toast(R.string.category_with_name_exists)
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ class CategoryCreateDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
*/
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.action_add_category)
|
||||
.title(R.string.add_category)
|
||||
.positiveButton(android.R.string.ok)
|
||||
.negativeButton(android.R.string.cancel)
|
||||
.input(hintRes = R.string.name) { _, input ->
|
||||
|
@ -36,7 +36,7 @@ class CategoryRenameDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
*/
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.action_rename_category)
|
||||
.title(R.string.rename_category)
|
||||
.negativeButton(android.R.string.cancel)
|
||||
.input(hintRes = R.string.name, prefill = currentName) { _, input ->
|
||||
currentName = input.toString()
|
||||
|
@ -85,7 +85,7 @@ class DownloadBottomSheet @JvmOverloads constructor(
|
||||
private fun updateDLTitle() {
|
||||
val extCount = presenter.downloadQueue.firstOrNull()
|
||||
title_text.text = if (extCount != null) resources.getString(
|
||||
R.string.downloading_x, extCount.chapter.name
|
||||
R.string.downloading_, extCount.chapter.name
|
||||
)
|
||||
else ""
|
||||
}
|
||||
@ -155,7 +155,7 @@ class DownloadBottomSheet @JvmOverloads constructor(
|
||||
if (presenter.downloadQueue.isEmpty()) {
|
||||
empty_view?.show(
|
||||
R.drawable.ic_file_download_black_128dp,
|
||||
R.string.nothing_downloading)
|
||||
R.string.nothing_is_downloading)
|
||||
} else {
|
||||
empty_view?.hide()
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class ExtensionBottomPresenter(
|
||||
.sortedBy { it.pkgName }
|
||||
|
||||
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 ->
|
||||
ExtensionItem(extension, header, currentDownloads[extension.pkgName])
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ ExtensionAdapter.OnButtonClickListener,
|
||||
|
||||
fun updateExtTitle() {
|
||||
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,
|
||||
extCount)
|
||||
|
||||
|
@ -63,7 +63,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||
}
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return resources?.getString(R.string.label_extension_info)
|
||||
return resources?.getString(R.string.extension_info)
|
||||
}
|
||||
|
||||
@SuppressLint("PrivateResource")
|
||||
@ -75,8 +75,8 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||
val context = view.context
|
||||
|
||||
extension_title.text = extension.name
|
||||
extension_version.text = context.getString(R.string.ext_version_info, extension.versionName)
|
||||
extension_lang.text = context.getString(R.string.ext_language_info, LocaleHelper.getDisplayName(extension.lang, context))
|
||||
extension_version.text = context.getString(R.string.version_, extension.versionName)
|
||||
extension_lang.text = context.getString(R.string.language_, LocaleHelper.getDisplayName(extension.lang, context))
|
||||
extension_pkg.text = extension.pkgName
|
||||
extension.getApplicationIcon(context)?.let { extension_icon.setImageDrawable(it) }
|
||||
extension_uninstall_button.clicks().subscribeUntilDestroy {
|
||||
@ -112,7 +112,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
||||
|
||||
if (screen.preferenceCount == 0) {
|
||||
extension_prefs_empty_view.show(R.drawable.ic_no_settings,
|
||||
R.string.ext_empty_preferences)
|
||||
R.string.empty_preferences_for_extension)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
||||
lang.text = if (extension !is Extension.Untrusted) {
|
||||
LocaleHelper.getDisplayName(extension.lang, itemView.context)
|
||||
} else {
|
||||
itemView.context.getString(R.string.ext_untrusted).toUpperCase()
|
||||
itemView.context.getString(R.string.untrusted).toUpperCase()
|
||||
}
|
||||
|
||||
GlideApp.with(itemView.context).clear(edit_button)
|
||||
@ -71,11 +71,11 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
||||
val installStep = item.installStep
|
||||
if (installStep != null) {
|
||||
setText(when (installStep) {
|
||||
InstallStep.Pending -> R.string.ext_pending
|
||||
InstallStep.Downloading -> R.string.ext_downloading
|
||||
InstallStep.Installing -> R.string.ext_installing
|
||||
InstallStep.Installed -> R.string.ext_installed
|
||||
InstallStep.Error -> R.string.action_retry
|
||||
InstallStep.Pending -> R.string.pending
|
||||
InstallStep.Downloading -> R.string.downloading
|
||||
InstallStep.Installing -> R.string.installing
|
||||
InstallStep.Installed -> R.string.installed
|
||||
InstallStep.Error -> R.string.retry
|
||||
})
|
||||
if (installStep != InstallStep.Error) {
|
||||
isEnabled = false
|
||||
@ -88,22 +88,22 @@ class ExtensionHolder(view: View, override val adapter: ExtensionAdapter) :
|
||||
backgroundTintList = ColorStateList.valueOf(
|
||||
context.getResourceColor(R.attr.colorAccent))
|
||||
strokeColor = ColorStateList.valueOf(Color.TRANSPARENT)
|
||||
setText(R.string.ext_update)
|
||||
setText(R.string.update)
|
||||
}
|
||||
extension.isObsolete -> {
|
||||
// Red outline
|
||||
setTextColor(ContextCompat.getColorStateList(context, R.drawable.button_bg_error))
|
||||
|
||||
setText(R.string.ext_obsolete)
|
||||
setText(R.string.obsolete)
|
||||
}
|
||||
else -> {
|
||||
setText(R.string.ext_details)
|
||||
setText(R.string.details)
|
||||
}
|
||||
}
|
||||
} else if (extension is Extension.Untrusted) {
|
||||
setText(R.string.ext_trust)
|
||||
setText(R.string.trust)
|
||||
} else {
|
||||
setText(R.string.ext_install)
|
||||
setText(R.string.install)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ class ExtensionTrustDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.untrusted_extension)
|
||||
.message(R.string.untrusted_extension_message)
|
||||
.positiveButton(R.string.ext_trust) {
|
||||
.positiveButton(R.string.trust) {
|
||||
listener.trustSignature(args.getString(SIGNATURE_KEY)!!)
|
||||
}
|
||||
.negativeButton(R.string.ext_uninstall) {
|
||||
.negativeButton(R.string.uninstall) {
|
||||
listener.uninstallExtension(args.getString(PKGNAME_KEY)!!)
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import uy.kohesive.injekt.api.get
|
||||
class SettingsExtensionsController : SettingsController() {
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.action_filter
|
||||
titleRes = R.string.filter
|
||||
|
||||
val activeLangs = preferences.enabledLanguages().getOrDefault()
|
||||
|
||||
|
@ -34,7 +34,7 @@ class ChangeMangaCategoriesDialog<T>(bundle: Bundle? = null) :
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.action_move_category)
|
||||
.title(R.string.move_to_categories)
|
||||
.listItemsMultiChoice(
|
||||
items = categories.map { it.name },
|
||||
initialSelection = preselected.toIntArray(),
|
||||
|
@ -35,7 +35,7 @@ class LibraryBadge @JvmOverloads constructor(context: Context, attrs: AttributeS
|
||||
with(download_text) {
|
||||
visibility = if (downloads == -2 || downloads > 0) View.VISIBLE else View.GONE
|
||||
text = if (downloads == -2)
|
||||
resources.getString(R.string.local_source_badge)
|
||||
resources.getString(R.string.local)
|
||||
else downloads.toString()
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) :
|
||||
} else {
|
||||
val category = db.getCategoriesForManga(iFlexible.manga)
|
||||
.executeAsBlocking().firstOrNull()?.name
|
||||
category ?: recyclerView.context.getString(R.string.default_columns)
|
||||
category ?: recyclerView.context.getString(R.string.default_value)
|
||||
}
|
||||
}
|
||||
LibrarySort.LAST_READ -> {
|
||||
@ -184,7 +184,7 @@ class LibraryCategoryAdapter(val libraryListener: LibraryListener) :
|
||||
LibrarySort.UNREAD -> {
|
||||
val unread = iFlexible.manga.unread
|
||||
if (unread > 0) getRange(unread)
|
||||
else recyclerView.context.getString(R.string.action_filter_read)
|
||||
else recyclerView.context.getString(R.string.read)
|
||||
}
|
||||
LibrarySort.TOTAL -> {
|
||||
val total = iFlexible.chapterCount
|
||||
|
@ -142,8 +142,8 @@ class LibraryController(
|
||||
override fun getTitle(): String? {
|
||||
return if (view != null && presenter.categories.size > 1) presenter.categories.find {
|
||||
it.order == activeCategory
|
||||
}?.name ?: view?.context?.getString(R.string.label_library)
|
||||
else view?.context?.getString(R.string.label_library)
|
||||
}?.name ?: view?.context?.getString(R.string.library)
|
||||
else view?.context?.getString(R.string.library)
|
||||
}
|
||||
|
||||
private var scrollListener = object : RecyclerView.OnScrollListener() {
|
||||
@ -290,7 +290,7 @@ class LibraryController(
|
||||
0 -> updateLibrary(presenter.allCategories.first())
|
||||
else -> updateLibrary()
|
||||
}
|
||||
}).positiveButton(R.string.action_update).show()
|
||||
}).positiveButton(R.string.update).show()
|
||||
}
|
||||
else -> {
|
||||
when (preferences.updateOnRefresh().getOrDefault()) {
|
||||
@ -437,8 +437,8 @@ class LibraryController(
|
||||
} else {
|
||||
empty_view?.show(
|
||||
R.drawable.ic_book_black_128dp,
|
||||
if (bottom_sheet.hasActiveFilters()) R.string.information_empty_library_filtered
|
||||
else R.string.information_empty_library
|
||||
if (bottom_sheet.hasActiveFilters()) R.string.no_matches_for_filters
|
||||
else R.string.library_is_empty_add_from_browse
|
||||
)
|
||||
}
|
||||
adapter.setItems(mangaMap)
|
||||
@ -731,10 +731,10 @@ class LibraryController(
|
||||
presenter.moveMangaToCategory(manga, category.id, mangaIds)
|
||||
snack?.dismiss()
|
||||
snack = view?.snack(
|
||||
resources!!.getString(R.string.moved_to_category, category.name)
|
||||
resources!!.getString(R.string.moved_to_, category.name)
|
||||
) {
|
||||
anchorView = bottom_sheet
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
manga.category = category.id!!
|
||||
presenter.moveMangaToCategory(manga, oldCatId, mangaIds)
|
||||
}
|
||||
@ -748,9 +748,9 @@ class LibraryController(
|
||||
snack = view?.snack(
|
||||
resources!!.getString(
|
||||
when {
|
||||
inQueue -> R.string.category_already_in_queue
|
||||
inQueue -> R.string._already_in_queue
|
||||
LibraryUpdateService.isRunning() -> R.string.adding_category_to_queue
|
||||
else -> R.string.updating_category_x
|
||||
else -> R.string.updating_
|
||||
}, category.name
|
||||
), Snackbar.LENGTH_LONG
|
||||
) {
|
||||
@ -869,18 +869,9 @@ class LibraryController(
|
||||
|
||||
override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean {
|
||||
val count = selectedMangas.size
|
||||
if (count == 0) {
|
||||
// Destroy action mode if there are no items selected.
|
||||
destroyActionModeIfNeeded()
|
||||
} else {
|
||||
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
|
||||
}
|
||||
// Destroy action mode if there are no items selected.
|
||||
if (count == 0) destroyActionModeIfNeeded()
|
||||
else mode.title = resources?.getString(R.string.selected_, count)
|
||||
return false
|
||||
}
|
||||
//endregion
|
||||
@ -889,8 +880,8 @@ class LibraryController(
|
||||
when (item.itemId) {
|
||||
R.id.action_move_to_category -> showChangeMangaCategoriesDialog()
|
||||
R.id.action_delete -> {
|
||||
MaterialDialog(activity!!).message(R.string.confirm_manga_deletion)
|
||||
.positiveButton(R.string.action_remove) {
|
||||
MaterialDialog(activity!!).message(R.string.remove_from_library_question)
|
||||
.positiveButton(R.string.remove) {
|
||||
deleteMangasFromLibrary()
|
||||
}.negativeButton(android.R.string.no).show()
|
||||
}
|
||||
@ -918,11 +909,11 @@ class LibraryController(
|
||||
destroyActionModeIfNeeded()
|
||||
snack?.dismiss()
|
||||
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
|
||||
var undoing = false
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
presenter.addMangas(mangas)
|
||||
undoing = true
|
||||
}
|
||||
|
@ -105,16 +105,16 @@ class LibraryHeaderItem(
|
||||
sortText.text = itemView.context.getString(R.string.sort_by_,
|
||||
itemView.context.getString(
|
||||
when (category.sortingMode()) {
|
||||
LibrarySort.LATEST_CHAPTER -> R.string.action_sort_latest_chapter
|
||||
LibrarySort.LATEST_CHAPTER -> R.string.latest_chapter
|
||||
LibrarySort.DRAG_AND_DROP ->
|
||||
if (category.id == -1) R.string.category
|
||||
else R.string.action_sort_drag_and_drop
|
||||
LibrarySort.TOTAL -> R.string.action_sort_total
|
||||
LibrarySort.UNREAD -> R.string.action_filter_unread
|
||||
LibrarySort.LAST_READ -> R.string.action_sort_last_read
|
||||
else R.string.drag_and_drop
|
||||
LibrarySort.TOTAL -> R.string.total_chapters
|
||||
LibrarySort.UNREAD -> R.string.unread
|
||||
LibrarySort.LAST_READ -> R.string.last_read
|
||||
LibrarySort.ALPHA -> R.string.title
|
||||
LibrarySort.DATE_ADDED -> R.string.action_date_added
|
||||
else -> R.string.action_sort_drag_and_drop
|
||||
LibrarySort.DATE_ADDED -> R.string.date_added
|
||||
else -> R.string.drag_and_drop
|
||||
}
|
||||
))
|
||||
|
||||
|
@ -516,7 +516,7 @@ class LibraryPresenter(
|
||||
categories.add(0, createDefaultCategory())
|
||||
|
||||
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.categories = if (!showCategories) arrayListOf(categoryAll)
|
||||
|
@ -177,17 +177,17 @@ class FilterBottomSheet @JvmOverloads constructor(context: Context, attrs: Attri
|
||||
}
|
||||
|
||||
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.setup(this, R.string.completed, R.string.ongoing)
|
||||
|
||||
unread = inflate(R.layout.filter_buttons) as FilterTagGroup
|
||||
unread.setup(this, R.string.action_filter_not_started, R.string.action_filter_in_progress,
|
||||
R.string.action_filter_read)
|
||||
unread.setup(this, R.string.not_started, R.string.in_progress,
|
||||
R.string.read)
|
||||
|
||||
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()
|
||||
|
||||
|
@ -18,10 +18,10 @@ class ChooseShapeDialog(bundle: Bundle? = null) : DialogController(bundle) {
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
val modes = intArrayOf(
|
||||
R.string.circular_icon,
|
||||
R.string.rounded_icon,
|
||||
R.string.square_icon,
|
||||
R.string.star_icon)
|
||||
R.string.circular,
|
||||
R.string.rounded,
|
||||
R.string.square,
|
||||
R.string.star)
|
||||
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.icon_shape)
|
||||
|
@ -48,7 +48,7 @@ class EditMangaDialog : DialogController {
|
||||
val dialog = MaterialDialog(activity!!).apply {
|
||||
customView(viewRes = R.layout.edit_manga_dialog, scrollable = true)
|
||||
negativeButton(android.R.string.cancel)
|
||||
positiveButton(R.string.action_save) { onPositiveButtonClick() }
|
||||
positiveButton(R.string.save) { onPositiveButtonClick() }
|
||||
}
|
||||
dialogView = dialog.view
|
||||
onViewCreated(dialog.view)
|
||||
|
@ -115,6 +115,7 @@ import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.util.Locale
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
|
||||
@ -581,7 +582,7 @@ class MangaDetailsController : BaseController,
|
||||
val popup = PopupMenu(itemView.context, itemView)
|
||||
|
||||
// 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 ->
|
||||
val chapters = listOf(item)
|
||||
@ -614,7 +615,7 @@ class MangaDetailsController : BaseController,
|
||||
if (bookmarked) R.string.removed_bookmark
|
||||
else R.string.bookmarked, Snackbar.LENGTH_INDEFINITE
|
||||
) {
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
bookmarkChapters(listOf(item), bookmarked)
|
||||
}
|
||||
}
|
||||
@ -634,7 +635,7 @@ class MangaDetailsController : BaseController,
|
||||
else R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE
|
||||
) {
|
||||
var undoing = false
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
presenter.markChaptersRead(listOf(item), read, true, lastRead, pagesLeft)
|
||||
undoing = true
|
||||
}
|
||||
@ -681,7 +682,7 @@ class MangaDetailsController : BaseController,
|
||||
val editItem = menu.findItem(R.id.action_edit)
|
||||
editItem.isVisible = presenter.manga.favorite && !presenter.isLockedFromSearch
|
||||
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 &&
|
||||
manga?.source != LocalSource.ID
|
||||
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 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.collapseActionView()
|
||||
if (query.isNotEmpty()) {
|
||||
@ -731,9 +732,9 @@ class MangaDetailsController : BaseController,
|
||||
if (manga?.hasCustomCover() == true) {
|
||||
MaterialDialog(activity!!).listItems(items = listOf(
|
||||
view!!.context.getString(
|
||||
R.string.action_edit_cover
|
||||
R.string.edit_cover
|
||||
), view!!.context.getString(
|
||||
R.string.action_reset_cover
|
||||
R.string.reset_cover
|
||||
)
|
||||
), waitForPositiveButton = false, selection = { _, index, _ ->
|
||||
when (index) {
|
||||
@ -751,8 +752,8 @@ class MangaDetailsController : BaseController,
|
||||
R.id.action_add_to_home_screen -> addToHomeScreen()
|
||||
R.id.action_refresh_tracking -> presenter.refreshTrackers()
|
||||
R.id.action_mark_all_as_read -> {
|
||||
MaterialDialog(view!!.context).message(R.string.mark_all_as_read_message)
|
||||
.positiveButton(R.string.action_mark_as_read) {
|
||||
MaterialDialog(view!!.context).message(R.string.mark_all_chapters_as_read)
|
||||
.positiveButton(R.string.mark_as_read) {
|
||||
markAsRead(presenter.chapters)
|
||||
}.negativeButton(android.R.string.cancel).show()
|
||||
}
|
||||
@ -803,7 +804,7 @@ class MangaDetailsController : BaseController,
|
||||
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) {
|
||||
context.toast(e.message)
|
||||
}
|
||||
@ -847,12 +848,14 @@ class MangaDetailsController : BaseController,
|
||||
}
|
||||
|
||||
private fun downloadChapters(chapters: List<ChapterItem>) {
|
||||
val view = view
|
||||
val view = view ?: return
|
||||
presenter.downloadChapters(chapters)
|
||||
if (view != null && !presenter.manga.favorite && (snack == null ||
|
||||
snack?.getText() != view.context.getString(R.string.snack_add_to_library))) {
|
||||
snack = view.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) {
|
||||
setAction(R.string.action_add) {
|
||||
val text = view.context.getString(R.string.add_x_to_library, presenter.manga.mangaType
|
||||
(view.context).toLowerCase(Locale.ROOT))
|
||||
if (!presenter.manga.favorite && (snack == null ||
|
||||
snack?.getText() != text)) {
|
||||
snack = view.snack(text, Snackbar.LENGTH_INDEFINITE) {
|
||||
setAction(R.string.add) {
|
||||
presenter.setFavorite(true)
|
||||
}
|
||||
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
|
||||
@ -906,7 +909,7 @@ class MangaDetailsController : BaseController,
|
||||
override fun onLoadCleared(placeholder: 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) {
|
||||
openChapter(item.chapter)
|
||||
} else if (snack == null || snack?.getText() != view?.context?.getString(
|
||||
R.string.no_next_chapter)) {
|
||||
snack = view?.snack(R.string.no_next_chapter, Snackbar.LENGTH_LONG) {
|
||||
R.string.next_chapter_not_found)) {
|
||||
snack = view?.snack(R.string.next_chapter_not_found, Snackbar.LENGTH_LONG) {
|
||||
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
|
||||
override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
|
||||
super.onDismissed(transientBottomBar, event)
|
||||
@ -1091,17 +1094,17 @@ class MangaDetailsController : BaseController,
|
||||
private fun showAddedSnack() {
|
||||
val view = view ?: return
|
||||
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() {
|
||||
val view = view ?: return
|
||||
snack?.dismiss()
|
||||
snack = view.snack(
|
||||
view.context.getString(R.string.manga_removed_library),
|
||||
view.context.getString(R.string.removed_from_library),
|
||||
Snackbar.LENGTH_INDEFINITE
|
||||
) {
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
presenter.setFavorite(true)
|
||||
}
|
||||
addCallback(object : BaseTransientBottomBar.BaseCallback<Snackbar>() {
|
||||
@ -1139,7 +1142,7 @@ class MangaDetailsController : BaseController,
|
||||
val clipboard = activity.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
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 {
|
||||
@ -1254,7 +1257,7 @@ class MangaDetailsController : BaseController,
|
||||
|
||||
override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean {
|
||||
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
|
||||
}
|
||||
|
||||
@ -1264,11 +1267,11 @@ class MangaDetailsController : BaseController,
|
||||
intent.type = "image/*"
|
||||
startActivityForResult(
|
||||
Intent.createChooser(intent,
|
||||
resources?.getString(R.string.file_select_cover)),
|
||||
resources?.getString(R.string.select_cover_image)),
|
||||
101
|
||||
)
|
||||
} 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()
|
||||
}
|
||||
} catch (error: IOException) {
|
||||
activity.toast(R.string.notification_cover_update_failed)
|
||||
activity.toast(R.string.failed_to_update_cover)
|
||||
Timber.e(error)
|
||||
}
|
||||
}
|
||||
|
@ -549,10 +549,10 @@ class MangaDetailsPresenter(
|
||||
|
||||
fun currentFilters(): String {
|
||||
val filtersId = mutableListOf<Int?>()
|
||||
filtersId.add(if (onlyRead()) R.string.action_filter_read else null)
|
||||
filtersId.add(if (onlyUnread()) R.string.action_filter_unread else null)
|
||||
filtersId.add(if (onlyDownloaded()) R.string.action_filter_downloaded else null)
|
||||
filtersId.add(if (onlyBookmarked()) R.string.action_filter_bookmarked else null)
|
||||
filtersId.add(if (onlyRead()) R.string.read else null)
|
||||
filtersId.add(if (onlyUnread()) R.string.unread else null)
|
||||
filtersId.add(if (onlyDownloaded()) R.string.downloaded else null)
|
||||
filtersId.add(if (onlyBookmarked()) R.string.bookmarked else null)
|
||||
return filtersId.filterNotNull().joinToString(", ") { preferences.context.getString(it) }
|
||||
}
|
||||
|
||||
|
@ -76,11 +76,11 @@ class MangaHeaderHolder(
|
||||
true
|
||||
}
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
manga_cover.setOnClickListener { adapter.delegate.zoomImageFromThumb(cover_card) }
|
||||
@ -137,7 +137,7 @@ class MangaHeaderHolder(
|
||||
else expand()
|
||||
}
|
||||
manga_summary_label.text = itemView.context.getString(
|
||||
R.string.about_this, itemView.context.getString(
|
||||
R.string.about_this_, itemView.context.getString(
|
||||
when {
|
||||
manga.mangaType() == Manga.TYPE_MANHWA -> R.string.manhwa
|
||||
manga.mangaType() == Manga.TYPE_MANHUA -> R.string.manhua
|
||||
@ -174,7 +174,7 @@ class MangaHeaderHolder(
|
||||
with(track_button) {
|
||||
visibleIf(presenter.hasTrackers())
|
||||
text = itemView.context.getString(
|
||||
if (tracked) R.string.action_filter_tracked
|
||||
if (tracked) R.string.tracked
|
||||
else R.string.tracking
|
||||
)
|
||||
|
||||
@ -192,8 +192,8 @@ class MangaHeaderHolder(
|
||||
text = if (nextChapter != null) {
|
||||
val number = adapter.decimalFormat.format(nextChapter.chapter_number.toDouble())
|
||||
if (nextChapter.chapter_number > 0) resources.getString(
|
||||
if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter
|
||||
else R.string.start_reading_chapter, number
|
||||
if (nextChapter.last_page_read > 0) R.string.continue_reading_chapter_
|
||||
else R.string.start_reading_chapter_, number
|
||||
)
|
||||
else {
|
||||
resources.getString(
|
||||
@ -268,7 +268,7 @@ class MangaHeaderHolder(
|
||||
val presenter = adapter.delegate.mangaPresenter()
|
||||
val tracked = presenter.isTracked()
|
||||
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)
|
||||
|
||||
icon = ContextCompat.getDrawable(itemView.context, if (tracked) R.drawable
|
||||
|
@ -32,7 +32,7 @@ open class BaseChapterHolder(
|
||||
|
||||
// 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(
|
||||
R.string.action_cancel
|
||||
R.string.cancel
|
||||
)
|
||||
|
||||
// Set a listener so we are notified if a menu item is clicked
|
||||
|
@ -33,7 +33,7 @@ class ChapterHolder(
|
||||
chapter_title.text = when (manga.displayMode) {
|
||||
Manga.DISPLAY_NUMBER -> {
|
||||
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
|
||||
}
|
||||
@ -68,7 +68,7 @@ class ChapterHolder(
|
||||
} else if (!chapter.read && chapter.last_page_read > 0 && !isLocked) {
|
||||
statuses.add(
|
||||
itemView.context.getString(
|
||||
R.string.chapter_progress, chapter.last_page_read + 1
|
||||
R.string.page_, chapter.last_page_read + 1
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -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
|
||||
)
|
||||
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)
|
||||
|
@ -63,7 +63,7 @@ class TrackSearchDialog : DialogController {
|
||||
val dialog = MaterialDialog(activity!!).apply {
|
||||
customView(viewRes = R.layout.track_search_dialog, scrollable = false)
|
||||
negativeButton(android.R.string.cancel)
|
||||
positiveButton(R.string.action_clear) { onPositiveButtonClick() }
|
||||
positiveButton(R.string.clear) { onPositiveButtonClick() }
|
||||
setActionButtonEnabled(WhichButton.POSITIVE, wasPreviouslyTracked)
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ class TrackingBottomSheet(private val controller: MangaDetailsController) : Bott
|
||||
val track = adapter?.getItem(position)?.track ?: return
|
||||
|
||||
if (track.tracking_url.isBlank()) {
|
||||
activity.toast(R.string.url_not_set)
|
||||
activity.toast(R.string.url_not_set_click_again)
|
||||
} else {
|
||||
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(track.tracking_url)))
|
||||
controller.refreshTracker = position
|
||||
|
@ -86,14 +86,14 @@ class MigrationController : NucleusController<MigrationPresenter>(),
|
||||
|
||||
fun render(state: ViewState) {
|
||||
if (state.selectedSource == null) {
|
||||
title = resources?.getString(R.string.label_migration)
|
||||
title = resources?.getString(R.string.source_migration)
|
||||
if (adapter !is SourceAdapter) {
|
||||
adapter = SourceAdapter(this)
|
||||
migration_recycler.adapter = adapter
|
||||
}
|
||||
adapter?.updateDataSet(state.sourcesWithManga)
|
||||
} else {
|
||||
val switching = title == resources?.getString(R.string.label_migration)
|
||||
val switching = title == resources?.getString(R.string.source_migration)
|
||||
title = state.selectedSource.toString()
|
||||
if (adapter !is MangaAdapter) {
|
||||
adapter = MangaAdapter(this)
|
||||
|
@ -22,14 +22,14 @@ class MigrationMangaDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
}
|
||||
|
||||
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,
|
||||
mangaSet, (
|
||||
if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_x, mangaSkipped)
|
||||
if (mangaSkipped > 0) " " + applicationContext?.getString(R.string.skipping_, mangaSkipped)
|
||||
else "")) ?: ""
|
||||
return MaterialDialog(activity!!).show {
|
||||
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()
|
||||
else (targetController as? MigrationListController)?.migrateMangas()
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class SearchController(
|
||||
val preselected = MigrationFlags.getEnabledFlagsPositions(prefValue)
|
||||
|
||||
return MaterialDialog(activity!!)
|
||||
.message(R.string.migration_dialog_what_to_include)
|
||||
.message(R.string.select_data_to_include)
|
||||
.listItemsMultiChoice(items = MigrationFlags.titles.map
|
||||
{ resources?.getString(it) as CharSequence },
|
||||
initialSelection = preselected.toIntArray()) { _, positions, _ ->
|
||||
@ -148,7 +148,7 @@ class SearchController(
|
||||
.positiveButton(R.string.migrate) {
|
||||
(targetController as? SearchController)?.migrateManga()
|
||||
}
|
||||
.negativeButton(R.string.copy) {
|
||||
.negativeButton(R.string.copy_value) {
|
||||
(targetController as? SearchController)?.copyManga()
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class SelectionHeader : AbstractHeaderItem<SelectionHeader.Holder>() {
|
||||
|
||||
class Holder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) : BaseFlexibleViewHolder(view, adapter) {
|
||||
init {
|
||||
title.text = view.context.getString(R.string.migration_selection_prompt)
|
||||
title.text = view.context.getString(R.string.select_a_source_to_migrate_from)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) :
|
||||
get() = card
|
||||
|
||||
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.setOnClickListener {
|
||||
adapter.selectClickListener?.onSelectClick(adapterPosition)
|
||||
|
@ -114,7 +114,7 @@ class MigrationBottomSheetDialog(
|
||||
skip_step.isChecked = preferences.skipPreMigration().getOrDefault()
|
||||
skip_step.setOnCheckedChangeListener { _, isChecked ->
|
||||
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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
adapter?.notifyDataSetChanged()
|
||||
} else {
|
||||
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()
|
||||
}
|
||||
}
|
||||
@ -397,8 +397,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
override fun handleBack(): Boolean {
|
||||
activity?.let {
|
||||
MaterialDialog(it).show {
|
||||
title(R.string.stop_migration)
|
||||
positiveButton(R.string.action_stop) {
|
||||
title(R.string.stop_migrating)
|
||||
positiveButton(R.string.stop) {
|
||||
router.popCurrentController()
|
||||
migrationsJob?.cancel()
|
||||
}
|
||||
@ -465,8 +465,8 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
if (migrationsJob?.isCancelled == false || adapter?.allMangasDone() == true) {
|
||||
activity?.let {
|
||||
MaterialDialog(it).show {
|
||||
title(R.string.stop_migration)
|
||||
positiveButton(R.string.action_stop) {
|
||||
title(R.string.stop_migrating)
|
||||
positiveButton(R.string.stop) {
|
||||
block()
|
||||
migrationsJob?.cancel()
|
||||
}
|
||||
|
@ -164,10 +164,10 @@ class MigrationProcessHolder(
|
||||
val latestChapter = mangaChapters.maxBy { it.chapter_number }?.chapter_number ?: -1f
|
||||
|
||||
if (latestChapter > 0f) {
|
||||
subtitle.text = context.getString(R.string.latest_x,
|
||||
subtitle.text = context.getString(R.string.latest_,
|
||||
DecimalFormat("#.#").format(latestChapter))
|
||||
} else {
|
||||
subtitle.text = context.getString(R.string.latest_x,
|
||||
subtitle.text = context.getString(R.string.latest_,
|
||||
context.getString(R.string.unknown))
|
||||
}
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
if (noDefault && presenter.manga?.viewer!! > 0) {
|
||||
snackbar = reader_layout.snack(
|
||||
getString(
|
||||
R.string.reading_mode, getString(
|
||||
R.string.reading_, getString(
|
||||
when (mangaViewer) {
|
||||
RIGHT_TO_LEFT -> R.string.right_to_left_viewer
|
||||
VERTICAL -> R.string.vertical_viewer
|
||||
@ -396,7 +396,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
).toLowerCase(Locale.getDefault())
|
||||
), 8000
|
||||
) {
|
||||
setAction(R.string.action_use_default) {
|
||||
setAction(R.string.use_default) {
|
||||
presenter.setMangaViewer(0)
|
||||
}
|
||||
}
|
||||
@ -564,7 +564,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
||||
clipData = ClipData.newRawUri(null, stream)
|
||||
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) {
|
||||
toast(when (result) {
|
||||
Success -> R.string.cover_updated
|
||||
AddToLibraryFirst -> R.string.notification_first_add_to_library
|
||||
Error -> R.string.notification_cover_update_failed
|
||||
AddToLibraryFirst -> R.string.must_be_in_library_to_edit
|
||||
Error -> R.string.failed_to_update_cover
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class ReaderPageSheet(
|
||||
if (page.status != Page.READY) return
|
||||
|
||||
MaterialDialog(activity)
|
||||
.title(R.string.confirm_set_image_as_cover)
|
||||
.title(R.string.use_image_as_cover)
|
||||
.positiveButton(android.R.string.yes) {
|
||||
activity.setAsCover(page)
|
||||
dismiss()
|
||||
|
@ -66,11 +66,11 @@ class SaveImageNotifier(private val context: Context) {
|
||||
setContentIntent(NotificationHandler.openImagePendingActivity(context, file))
|
||||
// Share action
|
||||
addAction(R.drawable.ic_share_grey_24dp,
|
||||
context.getString(R.string.action_share),
|
||||
context.getString(R.string.share),
|
||||
NotificationReceiver.shareImagePendingBroadcast(context, file.absolutePath, notificationId))
|
||||
// Delete action
|
||||
addAction(R.drawable.ic_delete_grey_24dp,
|
||||
context.getString(R.string.action_delete),
|
||||
context.getString(R.string.delete),
|
||||
NotificationReceiver.deleteImagePendingBroadcast(context, file.absolutePath, notificationId))
|
||||
|
||||
updateNotification()
|
||||
@ -96,7 +96,7 @@ class SaveImageNotifier(private val context: Context) {
|
||||
fun onError(error: String?) {
|
||||
// Create notification
|
||||
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))
|
||||
setSmallIcon(android.R.drawable.ic_menu_report_image)
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ class PagerPageHolder(
|
||||
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
page.chapter.pageLoader?.retryPage(page)
|
||||
}
|
||||
@ -444,7 +444,7 @@ class PagerPageHolder(
|
||||
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
|
||||
setMargins(margins, margins, margins, margins)
|
||||
}
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
page.chapter.pageLoader?.retryPage(page)
|
||||
}
|
||||
@ -458,7 +458,7 @@ class PagerPageHolder(
|
||||
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
|
||||
setMargins(margins, margins, margins, margins)
|
||||
}
|
||||
setText(R.string.action_open_in_browser)
|
||||
setText(R.string.open_in_browser)
|
||||
setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl))
|
||||
context.startActivity(intent)
|
||||
|
@ -93,16 +93,16 @@ class PagerTransitionHolder(
|
||||
|
||||
textView.text = if (nextChapter != null) {
|
||||
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)
|
||||
append("\n${transition.from.chapter.name}\n\n")
|
||||
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)
|
||||
append("\n${nextChapter.chapter.name}\n\n")
|
||||
}
|
||||
} else {
|
||||
context.getString(R.string.transition_no_next)
|
||||
context.getString(R.string.theres_no_next_chapter)
|
||||
}
|
||||
|
||||
if (nextChapter != null) {
|
||||
@ -118,16 +118,16 @@ class PagerTransitionHolder(
|
||||
|
||||
textView.text = if (prevChapter != null) {
|
||||
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)
|
||||
append("\n${transition.from.chapter.name}\n\n")
|
||||
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)
|
||||
append("\n${prevChapter.chapter.name}\n\n")
|
||||
}
|
||||
} else {
|
||||
context.getString(R.string.transition_no_previous)
|
||||
context.getString(R.string.theres_no_previous_chapter)
|
||||
}
|
||||
|
||||
if (prevChapter != null) {
|
||||
@ -162,7 +162,7 @@ class PagerTransitionHolder(
|
||||
|
||||
val textView = AppCompatTextView(context).apply {
|
||||
wrapContent()
|
||||
setText(R.string.transition_pages_loading)
|
||||
setText(R.string.loading_pages)
|
||||
}
|
||||
|
||||
pagesContainer.addView(progress)
|
||||
@ -182,12 +182,12 @@ class PagerTransitionHolder(
|
||||
private fun setError(error: Throwable) {
|
||||
val textView = AppCompatTextView(context).apply {
|
||||
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 {
|
||||
wrapContent()
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
val toChapter = transition.to
|
||||
if (toChapter != null) {
|
||||
|
@ -391,7 +391,7 @@ class WebtoonPageHolder(
|
||||
gravity = Gravity.CENTER_HORIZONTAL
|
||||
setMargins(0, parentHeight / 4, 0, 0)
|
||||
}
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
page?.let { it.chapter.pageLoader?.retryPage(it) }
|
||||
}
|
||||
@ -432,7 +432,7 @@ class WebtoonPageHolder(
|
||||
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
|
||||
setMargins(0, margins, 0, margins)
|
||||
}
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
page?.let { it.chapter.pageLoader?.retryPage(it) }
|
||||
}
|
||||
@ -446,7 +446,7 @@ class WebtoonPageHolder(
|
||||
layoutParams = FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT).apply {
|
||||
setMargins(0, margins, 0, margins)
|
||||
}
|
||||
setText(R.string.action_open_in_browser)
|
||||
setText(R.string.open_in_browser)
|
||||
setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(imageUrl))
|
||||
context.startActivity(intent)
|
||||
|
@ -93,16 +93,16 @@ class WebtoonTransitionHolder(
|
||||
|
||||
textView.text = if (nextChapter != null) {
|
||||
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)
|
||||
append("\n${transition.from.chapter.name}\n\n")
|
||||
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)
|
||||
append("\n${nextChapter.chapter.name}\n\n")
|
||||
}
|
||||
} else {
|
||||
context.getString(R.string.transition_no_next)
|
||||
context.getString(R.string.theres_no_next_chapter)
|
||||
}
|
||||
|
||||
if (nextChapter != null) {
|
||||
@ -118,16 +118,16 @@ class WebtoonTransitionHolder(
|
||||
|
||||
textView.text = if (prevChapter != null) {
|
||||
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)
|
||||
append("\n${transition.from.chapter.name}\n\n")
|
||||
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)
|
||||
append("\n${prevChapter.chapter.name}\n\n")
|
||||
}
|
||||
} else {
|
||||
context.getString(R.string.transition_no_previous)
|
||||
context.getString(R.string.theres_no_previous_chapter)
|
||||
}
|
||||
|
||||
if (prevChapter != null) {
|
||||
@ -174,7 +174,7 @@ class WebtoonTransitionHolder(
|
||||
|
||||
val textView = AppCompatTextView(context).apply {
|
||||
wrapContent()
|
||||
setText(R.string.transition_pages_loading)
|
||||
setText(R.string.loading_pages)
|
||||
}
|
||||
|
||||
pagesContainer.addView(progress)
|
||||
@ -194,12 +194,12 @@ class WebtoonTransitionHolder(
|
||||
private fun setError(error: Throwable, transition: ChapterTransition) {
|
||||
val textView = AppCompatTextView(context).apply {
|
||||
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 {
|
||||
wrapContent()
|
||||
setText(R.string.action_retry)
|
||||
setText(R.string.retry)
|
||||
setOnClickListener {
|
||||
val toChapter = transition.to
|
||||
if (toChapter != null) {
|
||||
|
@ -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>)
|
||||
}
|
||||
}
|
@ -53,7 +53,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
private var lastChapterId: Long? = null
|
||||
|
||||
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 {
|
||||
@ -161,7 +161,7 @@ class RecentChaptersController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
if (size > 0) {
|
||||
empty_view?.hide()
|
||||
} 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) {
|
||||
snack = view?.snack(R.string.marked_as_read, Snackbar.LENGTH_INDEFINITE) {
|
||||
var undoing = false
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
presenter.markChapterRead(item, read, lastRead, pagesLeft)
|
||||
undoing = true
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class RecentlyReadController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
empty_view?.hide()
|
||||
} else {
|
||||
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)
|
||||
startActivity(intent)
|
||||
} else {
|
||||
activity.toast(R.string.no_next_chapter)
|
||||
activity.toast(R.string.next_chapter_not_found)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class RecentlyReadHolder(
|
||||
|
||||
// Set source + chapter title
|
||||
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)
|
||||
|
||||
// Set last read timestamp title
|
||||
|
@ -10,6 +10,7 @@ import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.models.History
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||
import java.util.Locale
|
||||
|
||||
class RemoveHistoryDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
where T : Controller, T : RemoveHistoryDialog.Listener {
|
||||
@ -27,14 +28,17 @@ class RemoveHistoryDialog<T>(bundle: Bundle? = null) : DialogController(bundle)
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
val activity = activity!!
|
||||
|
||||
return MaterialDialog(activity)
|
||||
.title(R.string.action_remove)
|
||||
.message(R.string.dialog_with_checkbox_remove_description)
|
||||
.checkBoxPrompt(res = R.string.dialog_with_checkbox_reset) {}
|
||||
.negativeButton(android.R.string.cancel)
|
||||
.positiveButton(R.string.action_remove) {
|
||||
onPositive(it.isCheckPromptChecked())
|
||||
}
|
||||
return MaterialDialog(activity).title(R.string.remove)
|
||||
.message(R.string.this_will_reomve_the_read_date_question).checkBoxPrompt(
|
||||
text = activity.getString(
|
||||
R.string.reset_all_chapters_for_this_,
|
||||
(manga?.mangaType(activity) ?: activity.getString(R.string.manga)).toLowerCase(
|
||||
Locale.ROOT
|
||||
)
|
||||
)
|
||||
) {}.negativeButton(android.R.string.cancel).positiveButton(R.string.remove) {
|
||||
onPositive(it.isCheckPromptChecked())
|
||||
}
|
||||
}
|
||||
|
||||
private fun onPositive(checked: Boolean) {
|
||||
|
@ -43,17 +43,17 @@ class RecentMangaHolder(
|
||||
val notValidNum = item.mch.chapter.chapter_number <= 0
|
||||
body.text = when {
|
||||
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
|
||||
).toString()
|
||||
)
|
||||
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
|
||||
).toString()
|
||||
)
|
||||
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) +
|
||||
" (${DateUtils.getRelativeTimeSpanString(
|
||||
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
|
||||
)})"
|
||||
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
|
||||
).toString()
|
||||
)
|
||||
|
@ -77,8 +77,8 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return if (showingDownloads)
|
||||
resources?.getString(R.string.label_download_queue)
|
||||
else resources?.getString(R.string.short_recents)
|
||||
resources?.getString(R.string.download_queue)
|
||||
else resources?.getString(R.string.recents)
|
||||
}
|
||||
|
||||
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) {
|
||||
anchorView = activity?.bottom_nav
|
||||
var undoing = false
|
||||
setAction(R.string.action_undo) {
|
||||
setAction(R.string.undo) {
|
||||
presenter.markChapterRead(chapter, false, lastRead, pagesLeft)
|
||||
undoing = true
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ class SettingsAboutController : SettingsController() {
|
||||
private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_about
|
||||
titleRes = R.string.about
|
||||
|
||||
switchPreference {
|
||||
key = "acra.enable"
|
||||
titleRes = R.string.pref_enable_acra
|
||||
summaryRes = R.string.pref_acra_summary
|
||||
titleRes = R.string.send_crash_report
|
||||
summaryRes = R.string.helps_fix_bugs
|
||||
defaultValue = true
|
||||
}
|
||||
preference {
|
||||
@ -102,7 +102,7 @@ class SettingsAboutController : SettingsController() {
|
||||
private fun checkVersion() {
|
||||
if (activity == null) return
|
||||
|
||||
activity?.toast(R.string.update_check_look_for_updates)
|
||||
activity?.toast(R.string.searching_for_updates)
|
||||
scope.launch {
|
||||
val result = try {
|
||||
updateChecker.checkForUpdate()
|
||||
@ -122,7 +122,7 @@ class SettingsAboutController : SettingsController() {
|
||||
}
|
||||
is UpdateResult.NoNewUpdate -> {
|
||||
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 {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.update_check_title)
|
||||
.title(R.string.new_version_available)
|
||||
.message(text = args.getString(BODY_KEY) ?: "")
|
||||
.positiveButton(R.string.update_check_confirm) {
|
||||
.positiveButton(R.string.download) {
|
||||
val appContext = applicationContext
|
||||
if (appContext != null) {
|
||||
// Start download
|
||||
@ -148,7 +148,7 @@ class SettingsAboutController : SettingsController() {
|
||||
UpdaterService.downloadUpdate(appContext, url)
|
||||
}
|
||||
}
|
||||
.negativeButton(R.string.update_check_ignore)
|
||||
.negativeButton(R.string.ignore)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
@ -37,17 +37,17 @@ class SettingsAdvancedController : SettingsController() {
|
||||
private val db: DatabaseHelper by injectLazy()
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_advanced
|
||||
titleRes = R.string.advanced
|
||||
|
||||
preference {
|
||||
key = CLEAR_CACHE_KEY
|
||||
titleRes = R.string.pref_clear_chapter_cache
|
||||
summary = context.getString(R.string.used_cache, chapterCache.readableSize)
|
||||
titleRes = R.string.clear_chapter_cache
|
||||
summary = context.getString(R.string.used_, chapterCache.readableSize)
|
||||
|
||||
onClick { clearChapterCache() }
|
||||
}
|
||||
preference {
|
||||
titleRes = R.string.pref_clear_cookies
|
||||
titleRes = R.string.clear_cookies
|
||||
|
||||
onClick {
|
||||
network.cookieManager.removeAll()
|
||||
@ -55,8 +55,8 @@ class SettingsAdvancedController : SettingsController() {
|
||||
}
|
||||
}
|
||||
preference {
|
||||
titleRes = R.string.pref_clear_database
|
||||
summaryRes = R.string.pref_clear_database_summary
|
||||
titleRes = R.string.clear_database
|
||||
summaryRes = R.string.clear_database_summary
|
||||
|
||||
onClick {
|
||||
val ctrl = ClearDatabaseDialogController()
|
||||
@ -65,21 +65,21 @@ class SettingsAdvancedController : SettingsController() {
|
||||
}
|
||||
}
|
||||
preference {
|
||||
titleRes = R.string.pref_refresh_library_metadata
|
||||
summaryRes = R.string.pref_refresh_library_metadata_summary
|
||||
titleRes = R.string.refresh_library_metadata
|
||||
summaryRes = R.string.updates_covers_genres_desc
|
||||
|
||||
onClick { LibraryUpdateService.start(context, target = Target.DETAILS) }
|
||||
}
|
||||
preference {
|
||||
titleRes = R.string.pref_refresh_library_tracking
|
||||
summaryRes = R.string.pref_refresh_library_tracking_summary
|
||||
titleRes = R.string.refresh_tracking_metadata
|
||||
summaryRes = R.string.updates_tracking_details
|
||||
|
||||
onClick { LibraryUpdateService.start(context, target = Target.TRACKING) }
|
||||
}
|
||||
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() }
|
||||
}
|
||||
@ -101,7 +101,7 @@ class SettingsAdvancedController : SettingsController() {
|
||||
launchUI {
|
||||
val activity = activity ?: return@launchUI
|
||||
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(
|
||||
R.plurals.cleanup_done,
|
||||
foldersCleared,
|
||||
@ -130,10 +130,10 @@ class SettingsAdvancedController : SettingsController() {
|
||||
}, {
|
||||
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))
|
||||
findPreference(CLEAR_CACHE_KEY)?.summary =
|
||||
resources?.getString(R.string.used_cache, chapterCache.readableSize)
|
||||
resources?.getString(R.string.used_, chapterCache.readableSize)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,8 @@ class SettingsBackupController : SettingsController() {
|
||||
titleRes = R.string.backup
|
||||
|
||||
preference {
|
||||
titleRes = R.string.pref_create_backup
|
||||
summaryRes = R.string.pref_create_backup_summ
|
||||
titleRes = R.string.create_backup
|
||||
summaryRes = R.string.can_be_used_to_restore
|
||||
|
||||
onClick {
|
||||
val ctrl = CreateBackupDialog()
|
||||
@ -68,27 +68,27 @@ class SettingsBackupController : SettingsController() {
|
||||
}
|
||||
}
|
||||
preference {
|
||||
titleRes = R.string.pref_restore_backup
|
||||
summaryRes = R.string.pref_restore_backup_summ
|
||||
titleRes = R.string.restore_backup
|
||||
summaryRes = R.string.restore_from_backup_file
|
||||
|
||||
onClick {
|
||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
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)
|
||||
startActivityForResult(chooser, CODE_BACKUP_RESTORE)
|
||||
}
|
||||
}
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_backup_service_category
|
||||
titleRes = R.string.service
|
||||
|
||||
intListPreference(activity) {
|
||||
key = Keys.backupInterval
|
||||
titleRes = R.string.pref_backup_interval
|
||||
entriesRes = arrayOf(R.string.update_never, R.string.update_6hour,
|
||||
R.string.update_12hour, R.string.update_24hour,
|
||||
R.string.update_48hour, R.string.update_weekly)
|
||||
titleRes = R.string.backup_frequency
|
||||
entriesRes = arrayOf(R.string.manual, R.string.every_6_hours,
|
||||
R.string.every_12_hours, R.string.daily,
|
||||
R.string.every_2_days, R.string.weekly)
|
||||
entryValues = listOf(0, 6, 12, 24, 48, 168)
|
||||
defaultValue = 0
|
||||
|
||||
@ -105,7 +105,7 @@ class SettingsBackupController : SettingsController() {
|
||||
}
|
||||
val backupDir = preference {
|
||||
key = Keys.backupDirectory
|
||||
titleRes = R.string.pref_backup_directory
|
||||
titleRes = R.string.backup_location
|
||||
|
||||
onClick {
|
||||
val currentDir = preferences.backupsDirectory().getOrDefault()
|
||||
@ -126,7 +126,7 @@ class SettingsBackupController : SettingsController() {
|
||||
}
|
||||
val backupNumber = intListPreference(activity) {
|
||||
key = Keys.numberOfBackups
|
||||
titleRes = R.string.pref_backup_slots
|
||||
titleRes = R.string.max_auto_backups
|
||||
entries = listOf("1", "2", "3", "4", "5")
|
||||
entryRange = 1..5
|
||||
defaultValue = 1
|
||||
@ -210,8 +210,8 @@ class SettingsBackupController : SettingsController() {
|
||||
.map { activity.getString(it) }
|
||||
|
||||
return MaterialDialog(activity)
|
||||
.title(R.string.pref_create_backup)
|
||||
.message(R.string.backup_choice)
|
||||
.title(R.string.create_backup)
|
||||
.message(R.string.what_should_backup)
|
||||
.listItemsMultiChoice(items = options, disabledIndices = intArrayOf(0),
|
||||
initialSelection = intArrayOf(0)) { _, positions, _ ->
|
||||
var flags = 0
|
||||
@ -226,7 +226,7 @@ class SettingsBackupController : SettingsController() {
|
||||
|
||||
(targetController as? SettingsBackupController)?.createBackup(flags)
|
||||
}
|
||||
.positiveButton(R.string.action_create)
|
||||
.positiveButton(R.string.create)
|
||||
.negativeButton(android.R.string.cancel)
|
||||
}
|
||||
}
|
||||
@ -242,9 +242,9 @@ class SettingsBackupController : SettingsController() {
|
||||
return MaterialDialog(activity).apply {
|
||||
title(R.string.backup_created)
|
||||
if (uniFile.filePath != null)
|
||||
message(text = resources?.getString(R.string.file_saved, uniFile.filePath))
|
||||
positiveButton(R.string.action_close)
|
||||
negativeButton(R.string.action_share) {
|
||||
message(text = resources?.getString(R.string.file_saved_at_, uniFile.filePath))
|
||||
positiveButton(R.string.close)
|
||||
negativeButton(R.string.share) {
|
||||
val sendIntent = Intent(Intent.ACTION_SEND)
|
||||
sendIntent.type = "application/json"
|
||||
sendIntent.putExtra(Intent.EXTRA_STREAM, uniFile.uri)
|
||||
@ -265,9 +265,9 @@ class SettingsBackupController : SettingsController() {
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
.title(R.string.pref_restore_backup)
|
||||
.message(R.string.backup_restore_content)
|
||||
.positiveButton(R.string.action_restore) {
|
||||
.title(R.string.restore_backup)
|
||||
.message(R.string.restore_message)
|
||||
.positiveButton(R.string.restore) {
|
||||
val context = applicationContext
|
||||
if (context != null) {
|
||||
activity?.toast(R.string.restoring_backup)
|
||||
|
@ -29,11 +29,11 @@ class SettingsDownloadController : SettingsController() {
|
||||
private val db: DatabaseHelper by injectLazy()
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_downloads
|
||||
titleRes = R.string.downloads
|
||||
|
||||
preference {
|
||||
key = Keys.downloadsDirectory
|
||||
titleRes = R.string.pref_download_directory
|
||||
titleRes = R.string.download_location
|
||||
onClick {
|
||||
val ctrl = DownloadDirectoriesDialog()
|
||||
ctrl.targetController = this@SettingsDownloadController
|
||||
@ -48,20 +48,20 @@ class SettingsDownloadController : SettingsController() {
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.downloadOnlyOverWifi
|
||||
titleRes = R.string.pref_download_only_over_wifi
|
||||
titleRes = R.string.only_download_over_wifi
|
||||
defaultValue = true
|
||||
}
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_remove_after_read
|
||||
titleRes = R.string.remove_after_read
|
||||
|
||||
switchPreference {
|
||||
key = Keys.removeAfterMarkedAsRead
|
||||
titleRes = R.string.pref_remove_after_marked_as_read
|
||||
titleRes = R.string.remove_when_marked_as_read
|
||||
defaultValue = false
|
||||
}
|
||||
intListPreference(activity) {
|
||||
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,
|
||||
R.string.second_to_last, R.string.third_to_last, R.string.fourth_to_last,
|
||||
R.string.fifth_to_last)
|
||||
@ -73,16 +73,16 @@ class SettingsDownloadController : SettingsController() {
|
||||
val dbCategories = db.getCategories().executeAsBlocking()
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_download_new
|
||||
titleRes = R.string.download_new_chapters
|
||||
|
||||
switchPreference {
|
||||
key = Keys.downloadNew
|
||||
titleRes = R.string.pref_download_new
|
||||
titleRes = R.string.download_new_chapters
|
||||
defaultValue = false
|
||||
}
|
||||
multiSelectListPreferenceMat(activity) {
|
||||
key = Keys.downloadNewCategories
|
||||
titleRes = R.string.pref_download_new_categories
|
||||
titleRes = R.string.categories_to_include_in_download
|
||||
entries = dbCategories.map { it.name }
|
||||
entryValues = dbCategories.map { it.id.toString() }
|
||||
allSelectionRes = R.string.all
|
||||
@ -145,7 +145,7 @@ class SettingsDownloadController : SettingsController() {
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
val activity = activity!!
|
||||
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 }
|
||||
|
||||
return MaterialDialog(activity)
|
||||
|
@ -16,11 +16,11 @@ class SettingsGeneralController : SettingsController() {
|
||||
private val isUpdaterEnabled = BuildConfig.INCLUDE_UPDATER
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_general
|
||||
titleRes = R.string.general
|
||||
|
||||
listPreference(activity) {
|
||||
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",
|
||||
"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")
|
||||
@ -44,10 +44,11 @@ class SettingsGeneralController : SettingsController() {
|
||||
|
||||
intListPreference(activity) {
|
||||
key = Keys.theme
|
||||
titleRes = R.string.pref_theme
|
||||
entriesRes = arrayOf(R.string.white_theme, R.string.light_theme, R.string.dark_theme,
|
||||
R.string.amoled_theme, R.string.darkblue_theme, R.string.system_theme, R.string.system_amoled_theme,
|
||||
R.string.system_darkblue_theme)
|
||||
titleRes = R.string.app_theme
|
||||
entriesRes = arrayOf(R.string.white_theme, R.string.light_blue, R.string.dark,
|
||||
R.string.amoled_black, R.string.dark_blue, R.string.system_default, R.string
|
||||
.system_default_amoled,
|
||||
R.string.system_default_all_blue)
|
||||
entryValues = listOf(1, 8, 2, 3, 4, 5, 6, 7)
|
||||
defaultValue = 5
|
||||
|
||||
@ -59,7 +60,7 @@ class SettingsGeneralController : SettingsController() {
|
||||
|
||||
listPreference(activity) {
|
||||
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")
|
||||
entries = entryValues.map { value ->
|
||||
if (value == "") {
|
||||
@ -74,8 +75,8 @@ class SettingsGeneralController : SettingsController() {
|
||||
|
||||
switchPreference {
|
||||
key = Keys.automaticUpdates
|
||||
titleRes = R.string.pref_enable_automatic_updates
|
||||
summaryRes = R.string.pref_enable_automatic_updates_summary
|
||||
titleRes = R.string.check_for_updates
|
||||
summaryRes = R.string.auto_check_for_app_versions
|
||||
defaultValue = true
|
||||
|
||||
if (isUpdaterEnabled) {
|
||||
@ -94,7 +95,7 @@ class SettingsGeneralController : SettingsController() {
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_security
|
||||
titleRes = R.string.security
|
||||
|
||||
val biometricManager = BiometricManager.from(context)
|
||||
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)
|
||||
entries = values.mapNotNull {
|
||||
when (it) {
|
||||
0 -> context.getString(R.string.lock_always)
|
||||
-1 -> context.getString(R.string.lock_never)
|
||||
0 -> context.getString(R.string.always)
|
||||
-1 -> context.getString(R.string.never)
|
||||
else -> resources?.getQuantityString(
|
||||
R.plurals.lock_after_mins, it.toInt(), it
|
||||
)
|
||||
@ -130,8 +131,8 @@ class SettingsGeneralController : SettingsController() {
|
||||
|
||||
switchPreference {
|
||||
key = Keys.secureScreen
|
||||
titleRes = R.string.pref_secure_screen
|
||||
summaryRes = R.string.pref_secure_screen_summary
|
||||
titleRes = R.string.secure_screen
|
||||
summaryRes = R.string.hide_tachi_from_recents
|
||||
defaultValue = false
|
||||
|
||||
onChange {
|
||||
|
@ -1,22 +1,14 @@
|
||||
package eu.kanade.tachiyomi.ui.setting
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceScreen
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Category
|
||||
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.ui.base.controller.DialogController
|
||||
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
|
||||
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.api.get
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
@ -26,9 +18,9 @@ class SettingsLibraryController : SettingsController() {
|
||||
private val db: DatabaseHelper = Injekt.get()
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_library
|
||||
titleRes = R.string.library
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_display
|
||||
titleRes = R.string.display
|
||||
switchPreference {
|
||||
key = Keys.removeArticles
|
||||
titleRes = R.string.pref_remove_articles
|
||||
@ -40,9 +32,9 @@ class SettingsLibraryController : SettingsController() {
|
||||
val dbCategories = db.getCategories().executeAsBlocking()
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_categories
|
||||
titleRes = R.string.categories
|
||||
preference {
|
||||
titleRes = R.string.action_edit_categories
|
||||
titleRes = R.string.edit_categories
|
||||
val catCount = db.getCategories().executeAsBlocking().size
|
||||
summary = context.resources.getQuantityString(R.plurals.category, catCount, catCount)
|
||||
onClick { router.pushController(CategoryController().withFadeTransaction()) }
|
||||
@ -53,24 +45,24 @@ class SettingsLibraryController : SettingsController() {
|
||||
|
||||
val categories = listOf(Category.createDefault(context)) + dbCategories
|
||||
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()
|
||||
defaultValue = "-1"
|
||||
|
||||
val selectedCategory = categories.find { it.id == preferences.defaultCategory() }
|
||||
summary =
|
||||
selectedCategory?.name ?: context.getString(R.string.default_category_summary)
|
||||
selectedCategory?.name ?: context.getString(R.string.always_ask)
|
||||
onChange { newValue ->
|
||||
summary = categories.find {
|
||||
it.id == newValue as Int
|
||||
}?.name ?: context.getString(R.string.default_category_summary)
|
||||
}?.name ?: context.getString(R.string.always_ask)
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_update
|
||||
titleRes = R.string.updates
|
||||
intListPreference(activity) {
|
||||
key = Keys.updateOnRefresh
|
||||
titleRes = R.string.categories_on_manual
|
||||
@ -85,14 +77,14 @@ class SettingsLibraryController : SettingsController() {
|
||||
key = Keys.libraryUpdateInterval
|
||||
titleRes = R.string.pref_library_update_interval
|
||||
entriesRes = arrayOf(
|
||||
R.string.update_never,
|
||||
R.string.update_1hour,
|
||||
R.string.update_2hour,
|
||||
R.string.update_3hour,
|
||||
R.string.update_6hour,
|
||||
R.string.update_12hour,
|
||||
R.string.update_24hour,
|
||||
R.string.update_48hour
|
||||
R.string.manual,
|
||||
R.string.hourly,
|
||||
R.string.every_2_hours,
|
||||
R.string.every_3_hours,
|
||||
R.string.every_6_hours,
|
||||
R.string.every_12_hours,
|
||||
R.string.daily,
|
||||
R.string.every_2_days
|
||||
)
|
||||
entryValues = listOf(0, 1, 2, 3, 6, 12, 24, 48)
|
||||
defaultValue = 0
|
||||
@ -110,10 +102,10 @@ class SettingsLibraryController : SettingsController() {
|
||||
}
|
||||
multiSelectListPreferenceMat(activity) {
|
||||
key = Keys.libraryUpdateRestriction
|
||||
titleRes = R.string.pref_library_update_restriction
|
||||
titleRes = R.string.library_update_restriction
|
||||
entriesRes = arrayOf(R.string.wifi, R.string.charging)
|
||||
entryValues = listOf("wifi", "ac")
|
||||
customSummaryRes = R.string.pref_library_update_restriction_summary
|
||||
customSummaryRes = R.string.library_update_restriction_summary
|
||||
|
||||
preferences.libraryUpdateInterval().asObservable()
|
||||
.subscribeUntilDestroy { isVisible = it > 0 }
|
||||
@ -132,12 +124,12 @@ class SettingsLibraryController : SettingsController() {
|
||||
|
||||
intListPreference(activity) {
|
||||
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:
|
||||
// ../../data/library/LibraryUpdateRanker.kt
|
||||
entriesRes = arrayOf(
|
||||
R.string.action_sort_alpha, R.string.action_sort_last_updated
|
||||
R.string.alphabetically, R.string.last_updated
|
||||
)
|
||||
entryRange = 0..1
|
||||
defaultValue = 0
|
||||
@ -146,8 +138,8 @@ class SettingsLibraryController : SettingsController() {
|
||||
|
||||
switchPreference {
|
||||
key = Keys.refreshCoversToo
|
||||
titleRes = R.string.pref_refresh_covers_too
|
||||
summaryRes = R.string.pref_refresh_covers_too_summary
|
||||
titleRes = R.string.auto_refresh_covers
|
||||
summaryRes = R.string.auto_refresh_covers_summary
|
||||
defaultValue = true
|
||||
}
|
||||
|
||||
@ -171,7 +163,7 @@ class SettingsLibraryController : SettingsController() {
|
||||
}
|
||||
if (preferences.skipPreMigration().getOrDefault() || preferences.migrationSources().getOrDefault().isNotEmpty()) {
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_migration
|
||||
titleRes = R.string.migration
|
||||
// Only show this if someone has mass migrated manga once
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,44 +19,44 @@ class SettingsMainController : SettingsController() {
|
||||
}
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.label_settings
|
||||
titleRes = R.string.settings
|
||||
|
||||
val tintColor = context.getResourceColor(R.attr.colorAccent)
|
||||
|
||||
preference {
|
||||
iconRes = R.drawable.ic_tune_white_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_general
|
||||
titleRes = R.string.general
|
||||
onClick { navigateTo(SettingsGeneralController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_book_black_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_library
|
||||
titleRes = R.string.library
|
||||
onClick { navigateTo(SettingsLibraryController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_read_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_reader
|
||||
titleRes = R.string.reader
|
||||
onClick { navigateTo(SettingsReaderController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_file_download_black_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_downloads
|
||||
titleRes = R.string.downloads
|
||||
onClick { navigateTo(SettingsDownloadController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_swap_calls_white_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.label_migration
|
||||
titleRes = R.string.source_migration
|
||||
onClick { navigateTo(MigrationController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_sync_black_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_tracking
|
||||
titleRes = R.string.tracking
|
||||
onClick { navigateTo(SettingsTrackingController()) }
|
||||
}
|
||||
preference {
|
||||
@ -68,13 +68,13 @@ class SettingsMainController : SettingsController() {
|
||||
preference {
|
||||
iconRes = R.drawable.ic_code_black_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_advanced
|
||||
titleRes = R.string.advanced
|
||||
onClick { navigateTo(SettingsAdvancedController()) }
|
||||
}
|
||||
preference {
|
||||
iconRes = R.drawable.ic_info_black_24dp
|
||||
iconTint = tintColor
|
||||
titleRes = R.string.pref_category_about
|
||||
titleRes = R.string.about
|
||||
onClick { navigateTo(SettingsAboutController()) }
|
||||
}
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
class SettingsReaderController : SettingsController() {
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_reader
|
||||
titleRes = R.string.reader
|
||||
|
||||
intListPreference(activity) {
|
||||
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,
|
||||
R.string.vertical_viewer, R.string.webtoon)
|
||||
entryRange = 1..4
|
||||
@ -20,76 +20,76 @@ class SettingsReaderController : SettingsController() {
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.imageScaleType
|
||||
titleRes = R.string.pref_image_scale_type
|
||||
entriesRes = arrayOf(R.string.scale_type_fit_screen, R.string.scale_type_stretch,
|
||||
R.string.scale_type_fit_width, R.string.scale_type_fit_height,
|
||||
R.string.scale_type_original_size, R.string.scale_type_smart_fit)
|
||||
titleRes = R.string.scale_type
|
||||
entriesRes = arrayOf(R.string.fit_screen, R.string.stretch,
|
||||
R.string.fit_width, R.string.fit_height,
|
||||
R.string.original_size, R.string.smart_fit)
|
||||
entryRange = 1..6
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.zoomStart
|
||||
titleRes = R.string.pref_zoom_start
|
||||
entriesRes = arrayOf(R.string.zoom_start_automatic, R.string.zoom_start_left,
|
||||
R.string.zoom_start_right, R.string.zoom_start_center)
|
||||
titleRes = R.string.zoom_start_position
|
||||
entriesRes = arrayOf(R.string.automatic, R.string.left,
|
||||
R.string.right, R.string.center)
|
||||
entryRange = 1..4
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.rotation
|
||||
titleRes = R.string.pref_rotation_type
|
||||
entriesRes = arrayOf(R.string.rotation_free, R.string.rotation_lock,
|
||||
R.string.rotation_force_portrait, R.string.rotation_force_landscape)
|
||||
titleRes = R.string.rotation
|
||||
entriesRes = arrayOf(R.string.free, R.string.lock,
|
||||
R.string.force_portrait, R.string.force_landscape)
|
||||
entryRange = 1..4
|
||||
defaultValue = 1
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.readerTheme
|
||||
titleRes = R.string.pref_reader_theme
|
||||
entriesRes = arrayOf(R.string.white_background, R.string.black_background, R.string
|
||||
.reader_theme_smart, R.string.reader_theme_smart_theme)
|
||||
titleRes = R.string.background_color
|
||||
entriesRes = arrayOf(R.string.white, R.string.black, R.string
|
||||
.smart_based_on_page, R.string.smart_based_on_page_and_theme)
|
||||
entryRange = 0..3
|
||||
defaultValue = 2
|
||||
}
|
||||
intListPreference(activity) {
|
||||
key = Keys.doubleTapAnimationSpeed
|
||||
titleRes = R.string.pref_double_tap_anim_speed
|
||||
entries = listOf(context.getString(R.string.double_tap_anim_speed_0), context.getString(R
|
||||
.string.double_tap_anim_speed_fast), context.getString(R.string.double_tap_anim_speed_normal))
|
||||
titleRes = R.string.double_tap_anim_speed
|
||||
entries = listOf(context.getString(R.string.no_animation), context.getString(R
|
||||
.string.fast), context.getString(R.string.normal))
|
||||
entryValues = listOf(1, 250, 500) // using a value of 0 breaks the image viewer, so
|
||||
// min is 1
|
||||
defaultValue = 500
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.skipRead
|
||||
titleRes = R.string.pref_skip_read_chapters
|
||||
titleRes = R.string.skip_read_chapters
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.fullscreen
|
||||
titleRes = R.string.pref_fullscreen
|
||||
titleRes = R.string.fullscreen
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.keepScreenOn
|
||||
titleRes = R.string.pref_keep_screen_on
|
||||
titleRes = R.string.keep_screen_on
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showPageNumber
|
||||
titleRes = R.string.pref_show_page_number
|
||||
titleRes = R.string.show_page_number
|
||||
defaultValue = true
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
switchPreference {
|
||||
key = Keys.trueColor
|
||||
titleRes = R.string.pref_true_color
|
||||
titleRes = R.string.true_32bit_color
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.alwaysShowChapterTransition
|
||||
titleRes = R.string.pref_always_show_chapter_transition
|
||||
titleRes = R.string.always_show_chapter_transition
|
||||
defaultValue = true
|
||||
}
|
||||
|
||||
@ -98,12 +98,12 @@ class SettingsReaderController : SettingsController() {
|
||||
|
||||
switchPreference {
|
||||
key = Keys.enableTransitions
|
||||
titleRes = R.string.pref_page_transitions
|
||||
titleRes = R.string.page_transitions
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.cropBorders
|
||||
titleRes = R.string.pref_crop_borders
|
||||
titleRes = R.string.crop_borders
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
@ -112,31 +112,31 @@ class SettingsReaderController : SettingsController() {
|
||||
|
||||
switchPreference {
|
||||
key = Keys.cropBordersWebtoon
|
||||
titleRes = R.string.pref_crop_borders
|
||||
titleRes = R.string.crop_borders
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_reader_navigation
|
||||
titleRes = R.string.navigation
|
||||
|
||||
switchPreference {
|
||||
key = Keys.readWithTapping
|
||||
titleRes = R.string.pref_read_with_tapping
|
||||
titleRes = R.string.tapping
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.readWithLongTap
|
||||
titleRes = R.string.pref_read_with_long_tap
|
||||
titleRes = R.string.long_tap_dialog
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.readWithVolumeKeys
|
||||
titleRes = R.string.pref_read_with_volume_keys
|
||||
titleRes = R.string.volume_keys
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.readWithVolumeKeysInverted
|
||||
titleRes = R.string.pref_read_with_volume_keys_inverted
|
||||
titleRes = R.string.invert_volume_keys
|
||||
defaultValue = false
|
||||
}.apply { dependency = Keys.readWithVolumeKeys }
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class SettingsSourcesController : SettingsController(),
|
||||
private var sorting = SourcesSort.Alpha
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.action_filter
|
||||
titleRes = R.string.filter
|
||||
sorting = SourcesSort.from(preferences.sourceSorting().getOrDefault()) ?: SourcesSort.Alpha
|
||||
activity?.invalidateOptionsMenu()
|
||||
// Get the list of active language codes.
|
||||
@ -93,7 +93,7 @@ class SettingsSourcesController : SettingsController(),
|
||||
|
||||
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}"
|
||||
isPersistent = false
|
||||
isChecked = sources.all { it.id.toString() !in hiddenCatalogues }
|
||||
|
@ -22,7 +22,7 @@ class SettingsTrackingController : SettingsController(),
|
||||
private val trackManager: TrackManager by injectLazy()
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_tracking
|
||||
titleRes = R.string.tracking
|
||||
|
||||
switchPreference {
|
||||
key = Keys.autoUpdateTrack
|
||||
|
@ -31,7 +31,6 @@ import eu.kanade.tachiyomi.util.view.setStyle
|
||||
import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
import eu.kanade.tachiyomi.util.view.updatePadding
|
||||
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.swipe_refresh
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
@ -277,7 +276,7 @@ class WebViewActivity : BaseActivity() {
|
||||
type = "text/plain"
|
||||
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) {
|
||||
toast(e.message)
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ object LocaleHelper {
|
||||
fun getDisplayName(lang: String?, context: Context): String {
|
||||
return when (lang) {
|
||||
null -> ""
|
||||
"" -> context.getString(R.string.other_source)
|
||||
"all" -> context.getString(R.string.all_lang)
|
||||
"" -> context.getString(R.string.other)
|
||||
"all" -> context.getString(R.string.all)
|
||||
else -> {
|
||||
val locale = getLocale(lang)
|
||||
locale.getDisplayName(locale).capitalize()
|
||||
|
@ -20,7 +20,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle =
|
||||
constructor(source: Source) : this(Bundle().apply { putLong("key", source.id) })
|
||||
|
||||
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))
|
||||
password.setText(preferences.sourcePassword(source))
|
||||
}
|
||||
@ -44,7 +44,7 @@ class SourceLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle =
|
||||
password.text.toString())
|
||||
|
||||
dialog?.dismiss()
|
||||
context.toast(R.string.login_success)
|
||||
context.toast(R.string.successfully_logged_in)
|
||||
} else {
|
||||
preferences.setSourceCredentials(source, "", "")
|
||||
login.progress = -1
|
||||
|
@ -24,7 +24,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
|
||||
this(usernameLabel, Bundle().apply { putInt("key", service.id) })
|
||||
|
||||
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())
|
||||
password.setText(service.getPassword())
|
||||
}
|
||||
@ -44,19 +44,19 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
|
||||
val result = service.login(user, pass)
|
||||
if (result) {
|
||||
dialog?.dismiss()
|
||||
context.toast(R.string.login_success)
|
||||
context.toast(R.string.successfully_logged_in)
|
||||
} else {
|
||||
errorResult(this@apply)
|
||||
errorResult()
|
||||
}
|
||||
} catch (error: Exception) {
|
||||
errorResult(this@apply)
|
||||
errorResult()
|
||||
error.message?.let { context.toast(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun errorResult(view: View?) {
|
||||
private fun errorResult() {
|
||||
v?.apply {
|
||||
login.progress = -1
|
||||
login.setText(R.string.unknown_error)
|
||||
@ -66,7 +66,7 @@ class TrackLoginDialog(usernameLabel: String? = null, bundle: Bundle? = null) :
|
||||
override fun logout() {
|
||||
if (service.isLogged) {
|
||||
service.logout()
|
||||
activity?.toast(R.string.logout_success)
|
||||
activity?.toast(R.string.successfully_logged_out)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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>
|
@ -4,6 +4,6 @@
|
||||
android:layout_marginStart="8dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_auto_check_extensions">
|
||||
android:text="@string/notify_extension_updates">
|
||||
|
||||
</com.google.android.material.checkbox.MaterialCheckBox>
|
@ -28,7 +28,7 @@
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
app:backgroundTint="?colorAccent"
|
||||
android:text="@string/action_filter"
|
||||
android:text="@string/filter"
|
||||
android:layout_gravity="bottom|end"
|
||||
app:icon="@drawable/ic_filter_list_white_24dp"
|
||||
app:iconTint="@color/md_white_1000"
|
||||
|
@ -34,7 +34,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="?attr/tabBarIconColor"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/action_reset"
|
||||
android:text="@string/reset"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -33,7 +33,7 @@
|
||||
style="@style/Theme.Widget.Button.Borderless.Small"
|
||||
android:layout_width="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_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
@ -16,11 +16,4 @@
|
||||
android:clipToPadding="false"
|
||||
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>
|
||||
|
@ -31,14 +31,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="@string/action_sort" />
|
||||
android:text="@string/sort" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/set_as_default_sort"
|
||||
style="@style/Theme.Widget.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_as_default" />
|
||||
android:text="@string/set_as_default_for_all" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
@ -72,7 +72,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="@string/action_filter" />
|
||||
android:text="@string/filter" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/show_all"
|
||||
@ -164,7 +164,7 @@
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/round_ripple"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/action_close"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
android:tint="@color/gray_button" />
|
||||
|
@ -39,19 +39,19 @@
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_display_list" />
|
||||
android:text="@string/list" />
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/action_display_grid" />
|
||||
android:text="@string/compact_grid" />
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/action_display_comfy_grid" />
|
||||
android:text="@string/comfortable_grid" />
|
||||
</RadioGroup>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -95,7 +95,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/uniform_grid" />
|
||||
android:text="@string/uniform_covers" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
style="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
@ -104,7 +104,7 @@
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="@string/action_display_unread_badge" />
|
||||
android:text="@string/unread_badges" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/unread_badge_group"
|
||||
@ -150,7 +150,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/action_display_download_badge" />
|
||||
android:text="@string/download_badge" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/autohide_seeker"
|
||||
@ -166,7 +166,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/action_start_filters_hidden" />
|
||||
android:text="@string/start_with_filters_hidden" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@ -179,7 +179,7 @@
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/round_ripple"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/action_close"
|
||||
android:contentDescription="@string/close"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
android:tint="@color/gray_button" />
|
||||
|
@ -18,7 +18,7 @@
|
||||
android:layout_height="24dp"
|
||||
android:tint="@color/md_white_1000"
|
||||
android:layout_gravity="end|center"
|
||||
android:contentDescription="@string/action_cancel"
|
||||
android:contentDescription="@string/cancel"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:src="@drawable/ic_close_white_24dp" />
|
||||
</FrameLayout>
|
||||
@ -34,7 +34,7 @@
|
||||
android:id="@+id/close_left"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/action_cancel"
|
||||
android:contentDescription="@string/cancel"
|
||||
android:layout_gravity="start|center"
|
||||
android:layout_marginStart="21dp"
|
||||
android:tint="@color/md_white_1000"
|
||||
@ -53,7 +53,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_gravity="start"
|
||||
android:contentDescription="@string/action_reorganize_by"
|
||||
android:contentDescription="@string/reorder"
|
||||
android:scaleType="center"
|
||||
android:tint="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -120,7 +120,7 @@
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height"
|
||||
android:layout_toEndOf="@id/download_progress_text"
|
||||
android:contentDescription="@string/description_cover"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -17,7 +17,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_height="150dp"
|
||||
android:contentDescription="@string/description_cover"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:background="@drawable/image_border_background"
|
||||
android:src="@mipmap/ic_launcher"/>
|
||||
</FrameLayout>
|
||||
@ -35,7 +35,7 @@
|
||||
android:id="@+id/manga_author"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/manga_info_author_label"
|
||||
android:hint="@string/author"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:inputType="text"
|
||||
@ -45,7 +45,7 @@
|
||||
android:id="@+id/manga_artist"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/manga_info_artist_label"
|
||||
android:hint="@string/artist"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:inputType="text"
|
||||
|
@ -85,7 +85,7 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/ext_uninstall"
|
||||
android:text="@string/uninstall"
|
||||
style="@style/Theme.Widget.Button.Colored"
|
||||
app:layout_constraintStart_toStartOf="@id/guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -53,7 +53,7 @@
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/round_clear_border"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/action_clear"
|
||||
android:contentDescription="@string/clear"
|
||||
android:focusable="true"
|
||||
android:padding="3dp"
|
||||
android:src="@drawable/ic_close_white_24dp"
|
||||
@ -73,14 +73,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/action_hide_categories" />
|
||||
android:text="@string/hide_categories" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/view_options"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Theme.Widget.Button.TextButton"
|
||||
android:text="@string/action_view_options"
|
||||
android:text="@string/display_options"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_tune_white_24dp"
|
||||
app:iconTint="?android:attr/textColorPrimary"
|
||||
@ -92,7 +92,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/action_start_filters_hidden" />
|
||||
android:text="@string/start_with_filters_hidden" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
tools:visibility="visible"
|
||||
tools:tint="?attr/colorAccent"
|
||||
android:layout_width="wrap_content"
|
||||
android:contentDescription="@string/action_select_all"
|
||||
android:contentDescription="@string/select_all"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -87,6 +87,6 @@
|
||||
android:elevation="10dp"
|
||||
android:translationZ="20dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@string/description_cover"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:visibility="invisible" />
|
||||
</FrameLayout>
|
@ -72,7 +72,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/description_cover"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:maxHeight="300dp"
|
||||
@ -90,7 +90,7 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="4"
|
||||
android:text="@string/manga_info_full_title_label"
|
||||
android:text="@string/title"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -105,7 +105,7 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:text="@string/manga_info_author_label"
|
||||
android:text="@string/author"
|
||||
android:textAppearance="@style/TextAppearance.Regular.Body1.SemiBold"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textIsSelectable="false"
|
||||
@ -119,7 +119,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="@string/manga_info_latest_data_label"
|
||||
android:text="@string/updated"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintStart_toStartOf="@id/manga_full_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/manga_author"
|
||||
@ -171,7 +171,7 @@
|
||||
android:id="@+id/track_button"
|
||||
style="@style/Theme.Widget.Button.RounededOutline"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/manga_tracking_tab"
|
||||
android:text="@string/tracking"
|
||||
app:icon="@drawable/ic_sync_black_24dp" />
|
||||
|
||||
|
||||
@ -183,10 +183,10 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/action_open_in_web_view"
|
||||
android:contentDescription="@string/open_in_web_view"
|
||||
android:padding="5dp"
|
||||
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
|
||||
android:id="@+id/share_button"
|
||||
@ -196,10 +196,10 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:contentDescription="@string/action_share"
|
||||
android:contentDescription="@string/share"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_share_white_24dp"
|
||||
android:tooltipText="@string/action_share" />
|
||||
android:tooltipText="@string/share" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -345,7 +345,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:tooltipText="@string/action_sort_and_filter"
|
||||
android:tooltipText="@string/sort_and_filter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?selectable_list_drawable"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user