Added Material List view, removed old grid
And more layout fixes of course
This commit is contained in:
parent
f124dbdd58
commit
dc1fe311f8
@ -17,7 +17,6 @@ import com.f2prateek.rx.preferences.Preference
|
|||||||
import com.google.android.material.snackbar.BaseTransientBottomBar
|
import com.google.android.material.snackbar.BaseTransientBottomBar
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import com.jakewharton.rxbinding.support.v7.widget.queryTextChangeEvents
|
import com.jakewharton.rxbinding.support.v7.widget.queryTextChangeEvents
|
||||||
import com.jakewharton.rxbinding.view.visible
|
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
@ -239,7 +238,7 @@ open class BrowseCatalogueController(bundle: Bundle) :
|
|||||||
(layoutManager as androidx.recyclerview.widget.GridLayoutManager).spanSizeLookup = object : androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup() {
|
(layoutManager as androidx.recyclerview.widget.GridLayoutManager).spanSizeLookup = object : androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup() {
|
||||||
override fun getSpanSize(position: Int): Int {
|
override fun getSpanSize(position: Int): Int {
|
||||||
return when (adapter?.getItemViewType(position)) {
|
return when (adapter?.getItemViewType(position)) {
|
||||||
R.layout.catalogue_mat_grid_item, null -> 1
|
R.layout.catalogue_grid_item, null -> 1
|
||||||
else -> spanCount
|
else -> spanCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,51 +1,63 @@
|
|||||||
package eu.kanade.tachiyomi.ui.catalogue.browse
|
package eu.kanade.tachiyomi.ui.catalogue.browse
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
|
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||||
|
import com.bumptech.glide.signature.ObjectKey
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
|
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||||
|
import eu.kanade.tachiyomi.ui.library.LibraryCategoryAdapter
|
||||||
|
import eu.kanade.tachiyomi.util.view.gone
|
||||||
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
||||||
import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to hold the displayed data of a manga in the catalogue, like the cover or the title.
|
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
||||||
* All the elements from the layout file "item_catalogue_grid" are available in this class.
|
* All the elements from the layout file "item_catalogue_grid" are available in this class.
|
||||||
*
|
*
|
||||||
* @param view the inflated view for this holder.
|
* @param view the inflated view for this holder.
|
||||||
* @param adapter the adapter handling this holder.
|
* @param adapter the adapter handling this holder.
|
||||||
* @constructor creates a new catalogue holder.
|
* @param listener a listener to react to single tap and long tap events.
|
||||||
|
* @constructor creates a new library holder.
|
||||||
*/
|
*/
|
||||||
class CatalogueGridHolder(private val view: View, private val adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) :
|
class CatalogueGridHolder(
|
||||||
|
private val view: View,
|
||||||
|
private val adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) :
|
||||||
CatalogueHolder(view, adapter) {
|
CatalogueHolder(view, adapter) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this
|
* Method called from [LibraryCategoryAdapter.onBindViewHolder]. It updates the data for this
|
||||||
* holder with the given manga.
|
* holder with the given manga.
|
||||||
*
|
*
|
||||||
* @param manga the manga to bind.
|
* @param manga the manga item to bind.
|
||||||
*/
|
*/
|
||||||
override fun onSetValues(manga: Manga) {
|
override fun onSetValues(manga: Manga) {
|
||||||
// Set manga title
|
// Update the title of the manga.
|
||||||
title.text = manga.originalTitle()
|
title.text = manga.currentTitle()
|
||||||
|
subtitle.gone()
|
||||||
|
|
||||||
// Set alpha of thumbnail.
|
bookmark_text.visibility = if (manga.favorite) View.VISIBLE else View.GONE
|
||||||
thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
|
||||||
|
|
||||||
|
// Update the cover.
|
||||||
setImage(manga)
|
setImage(manga)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setImage(manga: Manga) {
|
override fun setImage(manga: Manga) {
|
||||||
GlideApp.with(view.context).clear(thumbnail)
|
if (manga.thumbnail_url == null)
|
||||||
if (!manga.thumbnail_url.isNullOrEmpty()) {
|
Glide.with(view.context).clear(cover_thumbnail)
|
||||||
|
else {
|
||||||
GlideApp.with(view.context)
|
GlideApp.with(view.context)
|
||||||
.load(manga)
|
.load(manga)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.placeholder(android.R.color.transparent)
|
.placeholder(android.R.color.transparent)
|
||||||
.into(StateImageViewTarget(thumbnail, progress))
|
.transition(DrawableTransitionOptions.withCrossFade())
|
||||||
|
.into(StateImageViewTarget(cover_thumbnail, progress))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.tachiyomi.ui.catalogue.browse
|
package eu.kanade.tachiyomi.ui.catalogue.browse
|
||||||
|
|
||||||
import android.view.Gravity
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
|
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
@ -13,10 +12,8 @@ import eu.davidea.flexibleadapter.items.IFlexible
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
|
||||||
import eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
import eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
||||||
import kotlinx.android.synthetic.main.catalogue_grid_item.view.*
|
import kotlinx.android.synthetic.main.catalogue_grid_item.view.*
|
||||||
import kotlinx.android.synthetic.main.catalogue_mat_grid_item.view.*
|
|
||||||
|
|
||||||
class CatalogueItem(val manga: Manga, private val catalogueAsList: Preference<Boolean>) :
|
class CatalogueItem(val manga: Manga, private val catalogueAsList: Preference<Boolean>) :
|
||||||
AbstractFlexibleItem<CatalogueHolder>() {
|
AbstractFlexibleItem<CatalogueHolder>() {
|
||||||
@ -25,7 +22,7 @@ class CatalogueItem(val manga: Manga, private val catalogueAsList: Preference<Bo
|
|||||||
return if (catalogueAsList.getOrDefault())
|
return if (catalogueAsList.getOrDefault())
|
||||||
R.layout.catalogue_list_item
|
R.layout.catalogue_list_item
|
||||||
else
|
else
|
||||||
R.layout.catalogue_mat_grid_item
|
R.layout.catalogue_grid_item
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): CatalogueHolder {
|
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): CatalogueHolder {
|
||||||
@ -37,7 +34,7 @@ class CatalogueItem(val manga: Manga, private val catalogueAsList: Preference<Bo
|
|||||||
cover_thumbnail.adjustViewBounds = false
|
cover_thumbnail.adjustViewBounds = false
|
||||||
cover_thumbnail.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, coverHeight)
|
cover_thumbnail.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, coverHeight)
|
||||||
}
|
}
|
||||||
CatalogueMatGridHolder(view, adapter)
|
CatalogueGridHolder(view, adapter)
|
||||||
} else {
|
} else {
|
||||||
CatalogueListHolder(view, adapter)
|
CatalogueListHolder(view, adapter)
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,12 @@ import eu.davidea.flexibleadapter.FlexibleAdapter
|
|||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.davidea.flexibleadapter.items.IFlexible
|
||||||
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.thumbnail
|
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.title
|
import kotlinx.android.synthetic.main.catalogue_list_item.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to hold the displayed data of a manga in the catalogue, like the cover or the title.
|
* Class used to hold the displayed data of a manga in the catalogue, like the cover or the title.
|
||||||
@ -22,9 +24,6 @@ import kotlinx.android.synthetic.main.catalogue_list_item.title
|
|||||||
class CatalogueListHolder(private val view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) :
|
class CatalogueListHolder(private val view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) :
|
||||||
CatalogueHolder(view, adapter) {
|
CatalogueHolder(view, adapter) {
|
||||||
|
|
||||||
private val favoriteColor = view.context.getResourceColor(android.R.attr.textColorHint)
|
|
||||||
private val unfavoriteColor = view.context.getResourceColor(android.R.attr.textColorPrimary)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this
|
* Method called from [CatalogueAdapter.onBindViewHolder]. It updates the data for this
|
||||||
* holder with the given manga.
|
* holder with the given manga.
|
||||||
@ -33,22 +32,26 @@ class CatalogueListHolder(private val view: View, adapter: FlexibleAdapter<IFlex
|
|||||||
*/
|
*/
|
||||||
override fun onSetValues(manga: Manga) {
|
override fun onSetValues(manga: Manga) {
|
||||||
title.text = manga.originalTitle()
|
title.text = manga.originalTitle()
|
||||||
title.setTextColor(if (manga.favorite) favoriteColor else unfavoriteColor)
|
with(subtitle) {
|
||||||
|
visibility = if (manga.favorite) View.VISIBLE else View.GONE
|
||||||
|
text = view.resources.getString(R.string.in_library)
|
||||||
|
setTextColor(view.context.getResourceColor(android.R.attr.colorAccent))
|
||||||
|
}
|
||||||
|
|
||||||
setImage(manga)
|
setImage(manga)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setImage(manga: Manga) {
|
override fun setImage(manga: Manga) {
|
||||||
GlideApp.with(view.context).clear(thumbnail)
|
if (manga.thumbnail_url.isNullOrEmpty()) {
|
||||||
if (!manga.thumbnail_url.isNullOrEmpty()) {
|
GlideApp.with(view.context).clear(contentView)
|
||||||
|
} else {
|
||||||
GlideApp.with(view.context)
|
GlideApp.with(view.context)
|
||||||
.load(manga)
|
.load(manga)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
||||||
.centerCrop()
|
|
||||||
.circleCrop()
|
|
||||||
.dontAnimate()
|
.dontAnimate()
|
||||||
.placeholder(android.R.color.transparent)
|
.placeholder(android.R.color.transparent)
|
||||||
.into(thumbnail)
|
.transition(DrawableTransitionOptions.withCrossFade())
|
||||||
|
.into(StateImageViewTarget(cover_thumbnail, progress))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
package eu.kanade.tachiyomi.ui.catalogue.browse
|
|
||||||
|
|
||||||
import android.view.View
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import com.bumptech.glide.Glide
|
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|
||||||
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
|
|
||||||
import com.bumptech.glide.signature.ObjectKey
|
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
|
||||||
import eu.kanade.tachiyomi.ui.library.LibraryCategoryAdapter
|
|
||||||
import eu.kanade.tachiyomi.util.view.gone
|
|
||||||
import eu.kanade.tachiyomi.widget.StateImageViewTarget
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_mat_grid_item.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
|
||||||
* All the elements from the layout file "item_catalogue_grid" are available in this class.
|
|
||||||
*
|
|
||||||
* @param view the inflated view for this holder.
|
|
||||||
* @param adapter the adapter handling this holder.
|
|
||||||
* @param listener a listener to react to single tap and long tap events.
|
|
||||||
* @constructor creates a new library holder.
|
|
||||||
*/
|
|
||||||
class CatalogueMatGridHolder(
|
|
||||||
private val view: View,
|
|
||||||
private val adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>) :
|
|
||||||
CatalogueHolder(view, adapter) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method called from [LibraryCategoryAdapter.onBindViewHolder]. It updates the data for this
|
|
||||||
* holder with the given manga.
|
|
||||||
*
|
|
||||||
* @param manga the manga item to bind.
|
|
||||||
*/
|
|
||||||
override fun onSetValues(manga: Manga) {
|
|
||||||
// Update the title of the manga.
|
|
||||||
title.text = manga.currentTitle()
|
|
||||||
subtitle.gone()
|
|
||||||
|
|
||||||
bookmark_text.visibility = if (manga.favorite) View.VISIBLE else View.GONE
|
|
||||||
|
|
||||||
// Update the cover.
|
|
||||||
setImage(manga)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setImage(manga: Manga) {
|
|
||||||
if (manga.thumbnail_url == null)
|
|
||||||
Glide.with(view.context).clear(cover_thumbnail)
|
|
||||||
else {
|
|
||||||
GlideApp.with(view.context)
|
|
||||||
.load(manga)
|
|
||||||
.diskCacheStrategy(DiskCacheStrategy.DATA)
|
|
||||||
.centerCrop()
|
|
||||||
.placeholder(android.R.color.transparent)
|
|
||||||
.transition(DrawableTransitionOptions.withCrossFade())
|
|
||||||
.into(StateImageViewTarget(cover_thumbnail, progress))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -245,6 +245,11 @@ class LibraryController(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onActivityPaused(activity: Activity) {
|
||||||
|
super.onActivityPaused(activity)
|
||||||
|
presenter.onDestroy()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
presenter.onDestroy()
|
presenter.onDestroy()
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
package eu.kanade.tachiyomi.ui.library
|
package eu.kanade.tachiyomi.ui.library
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.signature.ObjectKey
|
import com.bumptech.glide.signature.ObjectKey
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||||
import eu.kanade.tachiyomi.source.LocalSource
|
import eu.kanade.tachiyomi.source.LocalSource
|
||||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
||||||
|
import kotlinx.android.synthetic.main.catalogue_grid_item.view.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
||||||
@ -25,8 +24,9 @@ import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
|||||||
*/
|
*/
|
||||||
class LibraryGridHolder(
|
class LibraryGridHolder(
|
||||||
private val view: View,
|
private val view: View,
|
||||||
adapter: LibraryCategoryAdapter
|
adapter: LibraryCategoryAdapter,
|
||||||
|
var width:Int,
|
||||||
|
var fixedSize: Boolean
|
||||||
) : LibraryHolder(view, adapter) {
|
) : LibraryHolder(view, adapter) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,35 +37,70 @@ class LibraryGridHolder(
|
|||||||
*/
|
*/
|
||||||
override fun onSetValues(item: LibraryItem) {
|
override fun onSetValues(item: LibraryItem) {
|
||||||
// Update the title of the manga.
|
// Update the title of the manga.
|
||||||
with(title) {
|
title.text = item.manga.currentTitle()
|
||||||
visibility = if (item.manga.hide_title) View.GONE else View.VISIBLE
|
|
||||||
text = item.manga.currentTitle()
|
|
||||||
}
|
|
||||||
gradient.visibility = if (item.manga.hide_title) View.GONE else View.VISIBLE
|
|
||||||
|
|
||||||
// Update the unread count and its visibility.
|
// Update the unread count and its visibility.
|
||||||
with(unread_text) {
|
val unread = item.manga.unread
|
||||||
visibility =
|
|
||||||
if (item.manga.unread > 0 && item.unreadType == 1) View.VISIBLE else View.GONE
|
// Update the subtitle of the manga with artist or the unread count
|
||||||
text = item.manga.unread.toString()
|
with(subtitle) {
|
||||||
|
text = when {
|
||||||
|
item.manga.unread > 0 -> when (item.unreadType) {
|
||||||
|
1 -> view.resources.getQuantityString(R.plurals.unread_count, unread, unread)
|
||||||
|
0 -> view.resources.getString(R.string.new_chapter)
|
||||||
|
else -> item.manga.originalAuthor()
|
||||||
}
|
}
|
||||||
// Update the download count and its visibility.
|
else -> item.manga.originalAuthor()
|
||||||
unread_badge.visibility =
|
}
|
||||||
if (item.manga.unread > 0 && item.unreadType == 0) View.VISIBLE else View.GONE
|
setTextColor(
|
||||||
|
view.context.getResourceColor(
|
||||||
|
if (item.manga.unread > 0 && item.unreadType > -1) android.R.attr.colorAccent
|
||||||
|
else android.R.attr.textColorSecondary
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
play_layout.visibility = if (unread > 0) View.VISIBLE else View.GONE
|
||||||
|
play_layout.setOnClickListener { playButtonClicked() }
|
||||||
|
|
||||||
|
// Update the download count or local status and its visibility.
|
||||||
with(download_text) {
|
with(download_text) {
|
||||||
visibility = if (item.downloadCount > 0) View.VISIBLE else View.GONE
|
visibility = if (item.downloadCount > -1 && (item.downloadCount > 0 || item.manga
|
||||||
text = item.downloadCount.toString()
|
.source == LocalSource.ID))
|
||||||
|
View.VISIBLE else View.GONE
|
||||||
|
text = if (item.manga.source == LocalSource.ID)
|
||||||
|
itemView.resources.getString(R.string.local_source_badge)
|
||||||
|
else item.downloadCount.toString()
|
||||||
|
backgroundTintList = ContextCompat.getColorStateList(itemView.context,
|
||||||
|
if (item.manga.source == LocalSource.ID) R.color.md_teal_500
|
||||||
|
else R.color.md_red_500)
|
||||||
}
|
}
|
||||||
//set local visibility if its local manga
|
|
||||||
local_text.visibility = if (item.manga.source == LocalSource.ID) View.VISIBLE else View.GONE
|
|
||||||
|
|
||||||
// Update the cover.
|
// Update the cover.
|
||||||
if (item.manga.thumbnail_url == null)
|
if (item.manga.thumbnail_url == null) Glide.with(view.context).clear(cover_thumbnail)
|
||||||
GlideApp.with(view.context).clear(thumbnail)
|
else {
|
||||||
else GlideApp.with(view.context).load(item.manga)
|
val id = item.manga.id ?: return
|
||||||
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
|
var glide = GlideApp.with(view.context).load(item.manga)
|
||||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(item.manga.id!!).toString()))
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.centerCrop().into(thumbnail)
|
.signature(ObjectKey(MangaImpl.getLastCoverFetch(id).toString()))
|
||||||
|
glide = if (fixedSize) glide.centerCrop() else glide.override(width)
|
||||||
|
glide.into(cover_thumbnail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun playButtonClicked() {
|
||||||
|
adapter.libraryListener.startReading(adapterPosition)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onActionStateChanged(position: Int, actionState: Int) {
|
||||||
|
super.onActionStateChanged(position, actionState)
|
||||||
|
if (actionState == 2) {
|
||||||
|
view.card.isDragged = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onItemReleased(position: Int) {
|
||||||
|
super.onItemReleased(position)
|
||||||
|
view.card.isDragged = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import eu.kanade.tachiyomi.data.database.models.LibraryManga
|
|||||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
import eu.kanade.tachiyomi.source.SourceManager
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
import eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
import eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
||||||
import kotlinx.android.synthetic.main.catalogue_mat_grid_item.view.*
|
import kotlinx.android.synthetic.main.catalogue_grid_item.view.*
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
|
||||||
class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference<Boolean>,
|
class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference<Boolean>,
|
||||||
@ -29,7 +29,7 @@ class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference
|
|||||||
return if (libraryAsList.getOrDefault())
|
return if (libraryAsList.getOrDefault())
|
||||||
R.layout.catalogue_list_item
|
R.layout.catalogue_list_item
|
||||||
else
|
else
|
||||||
R.layout.catalogue_mat_grid_item
|
R.layout.catalogue_grid_item
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): LibraryHolder {
|
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): LibraryHolder {
|
||||||
@ -51,7 +51,7 @@ class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference
|
|||||||
cover_thumbnail.maxHeight = (parent.itemWidth / 3f * 6f).toInt()
|
cover_thumbnail.maxHeight = (parent.itemWidth / 3f * 6f).toInt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LibraryMatGridHolder(view, adapter as LibraryCategoryAdapter, parent.itemWidth, fixedSize)
|
LibraryGridHolder(view, adapter as LibraryCategoryAdapter, parent.itemWidth, fixedSize)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
LibraryListHolder(view, adapter as LibraryCategoryAdapter)
|
LibraryListHolder(view, adapter as LibraryCategoryAdapter)
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
package eu.kanade.tachiyomi.ui.library
|
package eu.kanade.tachiyomi.ui.library
|
||||||
|
|
||||||
|
import android.text.Html
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.text.HtmlCompat
|
||||||
|
import com.bumptech.glide.Glide
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
import eu.kanade.tachiyomi.data.glide.GlideApp
|
||||||
import eu.kanade.tachiyomi.source.LocalSource
|
import eu.kanade.tachiyomi.source.LocalSource
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.*
|
import kotlinx.android.synthetic.main.catalogue_list_item.*
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
|
||||||
import com.bumptech.glide.signature.ObjectKey
|
import com.bumptech.glide.signature.ObjectKey
|
||||||
import eu.davidea.flexibleadapter.items.IFlexible
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
||||||
import kotlinx.android.synthetic.main.catalogue_grid_item.*
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.download_text
|
import kotlinx.android.synthetic.main.catalogue_list_item.subtitle
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.local_text
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.thumbnail
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.title
|
import kotlinx.android.synthetic.main.catalogue_list_item.title
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.unread_badge
|
import kotlinx.android.synthetic.main.catalogue_list_item.view.*
|
||||||
import kotlinx.android.synthetic.main.catalogue_list_item.unread_text
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
||||||
@ -44,37 +43,89 @@ class LibraryListHolder(
|
|||||||
title.text = item.manga.currentTitle()
|
title.text = item.manga.currentTitle()
|
||||||
|
|
||||||
// Update the unread count and its visibility.
|
// Update the unread count and its visibility.
|
||||||
with(unread_text) {
|
val unread = item.manga.unread
|
||||||
visibility = if (item.manga.unread > 0 && item.unreadType == 1) View.VISIBLE else
|
|
||||||
View.GONE
|
|
||||||
text = item.manga.unread.toString()
|
|
||||||
}
|
|
||||||
unread_badge.visibility =
|
|
||||||
if (item.manga.unread > 0 && item.unreadType == 0) View.VISIBLE else View.GONE
|
|
||||||
// Update the download count and its visibility.
|
|
||||||
with(download_text) {
|
|
||||||
visibility = if (item.downloadCount > 0) View.VISIBLE else View.GONE
|
|
||||||
text = "${item.downloadCount}"
|
|
||||||
}
|
|
||||||
//show local text badge if local manga
|
|
||||||
local_text.visibility = if (item.manga.source == LocalSource.ID) View.VISIBLE else View.GONE
|
|
||||||
|
|
||||||
// Create thumbnail onclick to simulate long click
|
// Update the subtitle of the manga with artist or the unread count and download count
|
||||||
thumbnail.setOnClickListener {
|
"<font color=#cc0029>First Color</font>"
|
||||||
// Simulate long click on this view to enter selection mode
|
val subtitleText = when {
|
||||||
onLongClick(itemView)
|
unread > 0 -> when (item.unreadType) {
|
||||||
|
1 -> view.resources.getQuantityString(R.plurals.unread_count, unread, unread)
|
||||||
|
0 -> view.resources.getString(R.string.new_chapter)
|
||||||
|
else -> item.manga.originalAuthor()
|
||||||
}
|
}
|
||||||
|
else -> item.manga.originalAuthor()
|
||||||
|
}
|
||||||
|
// Update the download count or local status and its visibility.
|
||||||
|
val downloadText =
|
||||||
|
if (item.manga.source == LocalSource.ID)
|
||||||
|
itemView.resources.getString(R.string.local_source_badge)
|
||||||
|
else view.resources.getQuantityString(R.plurals.download_count,
|
||||||
|
item.downloadCount, item.downloadCount)
|
||||||
|
|
||||||
|
// Combine the 2 above using html
|
||||||
|
val subText = if (item.downloadCount > 0 || item.manga.source == LocalSource.ID) {
|
||||||
|
val downloadColor = convertColor(ContextCompat.getColor(itemView.context,
|
||||||
|
if (item.manga.source == LocalSource.ID) R.color.md_teal_500
|
||||||
|
else R.color.md_red_500))
|
||||||
|
val unreadColor = convertColor(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||||
|
when {
|
||||||
|
unread > 0 && item.unreadType > -1 -> "<font color=" +
|
||||||
|
"#$downloadColor>$downloadText</font> | " +
|
||||||
|
"<font color=#$unreadColor>$subtitleText</font>"
|
||||||
|
subtitleText != null -> "<font color=#$downloadColor>$downloadText</font> | " +
|
||||||
|
subtitleText
|
||||||
|
else -> "<font color=#$downloadColor>$downloadText</font>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
subtitleText
|
||||||
|
}
|
||||||
|
with(subtitle) {
|
||||||
|
text = HtmlCompat.fromHtml(subText ?: "", HtmlCompat.FROM_HTML_MODE_LEGACY)
|
||||||
|
setTextColor(
|
||||||
|
view.context.getResourceColor(
|
||||||
|
if (item.manga.unread > 0 && item.unreadType > -1 && item.downloadCount <= 0
|
||||||
|
&& item.manga.source != LocalSource.ID)
|
||||||
|
android.R.attr.colorAccent
|
||||||
|
else android.R.attr.textColorSecondary
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
play_layout.visibility = if (unread > 0) View.VISIBLE else View.GONE
|
||||||
|
play_layout.setOnClickListener { playButtonClicked() }
|
||||||
|
|
||||||
// Update the cover.
|
// Update the cover.
|
||||||
GlideApp.with(itemView.context).clear(thumbnail)
|
if (item.manga.thumbnail_url == null) Glide.with(view.context).clear(cover_thumbnail)
|
||||||
GlideApp.with(itemView.context)
|
else {
|
||||||
.load(item.manga)
|
val id = item.manga.id ?: return
|
||||||
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
|
val height = itemView.context.resources.getDimensionPixelSize(R.dimen
|
||||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(item.manga.id!!).toString()))
|
.material_component_lists_single_line_with_avatar_height)
|
||||||
.centerCrop()
|
GlideApp.with(view.context).load(item.manga)
|
||||||
.circleCrop()
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.dontAnimate()
|
.signature(ObjectKey(MangaImpl.getLastCoverFetch(id).toString()))
|
||||||
.into(thumbnail)
|
.override(height)
|
||||||
|
.into(cover_thumbnail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun convertColor(color: Int):String {
|
||||||
|
return Integer.toHexString(color and 0x00ffffff)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun playButtonClicked() {
|
||||||
|
adapter.libraryListener.startReading(adapterPosition)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onActionStateChanged(position: Int, actionState: Int) {
|
||||||
|
super.onActionStateChanged(position, actionState)
|
||||||
|
if (actionState == 2) {
|
||||||
|
view.card.isDragged = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onItemReleased(position: Int) {
|
||||||
|
super.onItemReleased(position)
|
||||||
|
view.card.isDragged = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
package eu.kanade.tachiyomi.ui.library
|
|
||||||
|
|
||||||
import android.view.View
|
|
||||||
import com.bumptech.glide.Glide
|
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
|
||||||
import com.bumptech.glide.signature.ObjectKey
|
|
||||||
import eu.kanade.tachiyomi.R
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.MangaImpl
|
|
||||||
import eu.kanade.tachiyomi.data.glide.GlideApp
|
|
||||||
import eu.kanade.tachiyomi.source.LocalSource
|
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_mat_grid_item.*
|
|
||||||
import kotlinx.android.synthetic.main.catalogue_mat_grid_item.view.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class used to hold the displayed data of a manga in the library, like the cover or the title.
|
|
||||||
* All the elements from the layout file "item_catalogue_grid" are available in this class.
|
|
||||||
*
|
|
||||||
* @param view the inflated view for this holder.
|
|
||||||
* @param adapter the adapter handling this holder.
|
|
||||||
* @param listener a listener to react to single tap and long tap events.
|
|
||||||
* @constructor creates a new library holder.
|
|
||||||
*/
|
|
||||||
class LibraryMatGridHolder(
|
|
||||||
private val view: View,
|
|
||||||
adapter: LibraryCategoryAdapter,
|
|
||||||
var width:Int,
|
|
||||||
var fixedSize: Boolean
|
|
||||||
) : LibraryHolder(view, adapter) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method called from [LibraryCategoryAdapter.onBindViewHolder]. It updates the data for this
|
|
||||||
* holder with the given manga.
|
|
||||||
*
|
|
||||||
* @param item the manga item to bind.
|
|
||||||
*/
|
|
||||||
override fun onSetValues(item: LibraryItem) {
|
|
||||||
// Update the title of the manga.
|
|
||||||
title.text = item.manga.currentTitle()
|
|
||||||
|
|
||||||
// Update the unread count and its visibility.
|
|
||||||
val unread = item.manga.unread
|
|
||||||
|
|
||||||
// Update the subtitle of the manga with artist or the unread count
|
|
||||||
with(subtitle) {
|
|
||||||
text = when {
|
|
||||||
item.manga.unread > 0 -> when (item.unreadType) {
|
|
||||||
1 -> view.resources.getQuantityString(R.plurals.unread_count, unread, unread)
|
|
||||||
0 -> view.resources.getString(R.string.new_chapter)
|
|
||||||
else -> item.manga.originalAuthor()
|
|
||||||
}
|
|
||||||
else -> item.manga.originalAuthor()
|
|
||||||
}
|
|
||||||
setTextColor(
|
|
||||||
view.context.getResourceColor(
|
|
||||||
if (item.manga.unread > 0 && item.unreadType > -1) android.R.attr.colorAccent
|
|
||||||
else android.R.attr.textColorSecondary
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
play_layout.visibility = if (unread > 0) View.VISIBLE else View.GONE
|
|
||||||
play_layout.setOnClickListener { playButtonClicked() }
|
|
||||||
|
|
||||||
// Update the download count and its visibility.
|
|
||||||
with(download_text) {
|
|
||||||
visibility = if (item.downloadCount > 0) View.VISIBLE else View.GONE
|
|
||||||
text = item.downloadCount.toString()
|
|
||||||
}
|
|
||||||
// Set local visibility if its local manga
|
|
||||||
local_text.visibility = if (item.manga.source == LocalSource.ID) View.VISIBLE else View.GONE
|
|
||||||
|
|
||||||
// Update the cover.
|
|
||||||
if (item.manga.thumbnail_url == null) Glide.with(view.context).clear(cover_thumbnail)
|
|
||||||
else {
|
|
||||||
val id = item.manga.id ?: return
|
|
||||||
var glide = GlideApp.with(view.context).load(item.manga)
|
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
|
||||||
.signature(ObjectKey(MangaImpl.getLastCoverFetch(id).toString()))
|
|
||||||
glide = if (fixedSize) glide.centerCrop() else glide.override(width)
|
|
||||||
glide.into(cover_thumbnail)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun playButtonClicked() {
|
|
||||||
adapter.libraryListener.startReading(adapterPosition)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActionStateChanged(position: Int, actionState: Int) {
|
|
||||||
super.onActionStateChanged(position, actionState)
|
|
||||||
if (actionState == 2) {
|
|
||||||
view.card.isDragged = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onItemReleased(position: Int) {
|
|
||||||
super.onItemReleased(position)
|
|
||||||
view.card.isDragged = false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -84,8 +84,6 @@ class LibraryPresenter(
|
|||||||
|
|
||||||
private var currentMangaMap:LibraryMap? = null
|
private var currentMangaMap:LibraryMap? = null
|
||||||
|
|
||||||
private var readerSubscription: Subscription? = null
|
|
||||||
|
|
||||||
fun isDownloading() = downloadManager.hasQueue()
|
fun isDownloading() = downloadManager.hasQueue()
|
||||||
|
|
||||||
fun onDestroy() {
|
fun onDestroy() {
|
||||||
|
@ -19,20 +19,20 @@ class MangaHolder(
|
|||||||
title.text = item.manga.currentTitle()
|
title.text = item.manga.currentTitle()
|
||||||
|
|
||||||
// Create thumbnail onclick to simulate long click
|
// Create thumbnail onclick to simulate long click
|
||||||
thumbnail.setOnClickListener {
|
cover_thumbnail.setOnClickListener {
|
||||||
// Simulate long click on this view to enter selection mode
|
// Simulate long click on this view to enter selection mode
|
||||||
onLongClick(itemView)
|
onLongClick(itemView)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the cover.
|
// Update the cover.
|
||||||
GlideApp.with(itemView.context).clear(thumbnail)
|
GlideApp.with(itemView.context).clear(cover_thumbnail)
|
||||||
GlideApp.with(itemView.context)
|
GlideApp.with(itemView.context)
|
||||||
.load(item.manga)
|
.load(item.manga)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.centerCrop()
|
// .centerCrop()
|
||||||
.circleCrop()
|
// .circleCrop()
|
||||||
.dontAnimate()
|
.dontAnimate()
|
||||||
.into(thumbnail)
|
.into(cover_thumbnail)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,13 @@ class SettingsLibraryController : SettingsController() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switchPreference {
|
||||||
|
key = Keys.libraryGridFixed
|
||||||
|
titleRes = R.string.pref_fixed_grid
|
||||||
|
summaryRes = R.string.pref_fixed_grid_summary
|
||||||
|
defaultValue = false
|
||||||
|
}
|
||||||
|
|
||||||
switchPreference {
|
switchPreference {
|
||||||
key = Keys.removeArticles
|
key = Keys.removeArticles
|
||||||
titleRes = R.string.pref_remove_articles
|
titleRes = R.string.pref_remove_articles
|
||||||
@ -59,12 +66,6 @@ class SettingsLibraryController : SettingsController() {
|
|||||||
defaultValue = false
|
defaultValue = false
|
||||||
}
|
}
|
||||||
|
|
||||||
switchPreference {
|
|
||||||
key = Keys.libraryGridFixed
|
|
||||||
titleRes = R.string.pref_fixed_grid
|
|
||||||
summaryRes = R.string.pref_fixed_grid_summary
|
|
||||||
defaultValue = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val dbCategories = db.getCategories().executeAsBlocking()
|
val dbCategories = db.getCategories().executeAsBlocking()
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:color="@color/rippleColor">
|
|
||||||
<item>
|
|
||||||
<selector>
|
|
||||||
<item android:state_selected="true">
|
|
||||||
<color android:color="@color/rippleColor" />
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item android:drawable="@color/rippleColor" android:state_focused="true"/>
|
|
||||||
<item android:drawable="@color/rippleColor" android:state_pressed="true"/>
|
|
||||||
<item android:drawable="@color/rippleColor" android:state_activated="true"/>
|
|
||||||
<item android:drawable="@color/darkPrimaryColor"/>
|
|
||||||
|
|
||||||
<item>
|
|
||||||
<color android:color="@color/dialog" />
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
</item>
|
|
||||||
</ripple>
|
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="@color/selectorColor">
|
android:color="@color/fullRippleColor">
|
||||||
<item android:id="@android:id/mask"
|
<item android:id="@android:id/mask"
|
||||||
android:top="0dp"
|
android:top="0dp"
|
||||||
android:bottom="12dp"
|
android:bottom="12dp"
|
||||||
@ -8,7 +8,7 @@
|
|||||||
android:right="4dp">
|
android:right="4dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="4dp" />
|
<corners android:radius="4dp" />
|
||||||
<solid android:color="@color/selectorColor" />
|
<solid android:color="@color/fullRippleColor" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item
|
<item
|
||||||
@ -20,14 +20,14 @@
|
|||||||
<item android:state_selected="true">
|
<item android:state_selected="true">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="4dp" />
|
<corners android:radius="4dp" />
|
||||||
<solid android:color="@color/selectorColor" />
|
<solid android:color="@color/fullRippleColor" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item android:state_activated="true">
|
<item android:state_activated="true">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<corners android:radius="4dp" />
|
<corners android:radius="4dp" />
|
||||||
<solid android:color="@color/selectorColor" />
|
<solid android:color="@color/fullRippleColor" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
||||||
|
@ -1,18 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:color="@color/rippleColor">
|
android:color="@color/fullRippleColor">
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<color android:color="@color/fullRippleColor" />
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<selector>
|
<selector>
|
||||||
<item android:state_selected="true">
|
<item android:state_selected="true">
|
||||||
<color android:color="@color/rippleColor" />
|
<color android:color="@color/fullRippleColor" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item android:state_activated="true">
|
<item android:state_activated="true">
|
||||||
<color android:color="@color/rippleColor" />
|
<color android:color="@color/fullRippleColor" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item android:id="@android:id/mask">
|
||||||
<color android:color="@color/dialog" />
|
<color android:color="?android:attr/colorBackground" />
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
||||||
</item>
|
</item>
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:color="@color/rippleColor">
|
|
||||||
<item>
|
|
||||||
<selector>
|
|
||||||
<item android:state_selected="true">
|
|
||||||
<color android:color="@color/rippleColor" />
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item android:state_activated="true">
|
|
||||||
<color android:color="@color/rippleColor" />
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item>
|
|
||||||
<color android:color="@color/md_black_1000" />
|
|
||||||
</item>
|
|
||||||
</selector>
|
|
||||||
</item>
|
|
||||||
</ripple>
|
|
@ -7,14 +7,16 @@
|
|||||||
<color android:color="@color/rippleColor" />
|
<color android:color="@color/rippleColor" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item android:drawable="@color/rippleColor" android:state_focused="true"/>
|
<item
|
||||||
<item android:drawable="@color/rippleColor" android:state_pressed="true"/>
|
android:drawable="@color/rippleColor"
|
||||||
<item android:drawable="@color/rippleColor" android:state_activated="true"/>
|
android:state_focused="true" />
|
||||||
<item android:drawable="@color/darkPrimaryColor"/>
|
<item
|
||||||
|
android:drawable="@color/rippleColor"
|
||||||
|
android:state_pressed="true" />
|
||||||
|
<item
|
||||||
|
android:drawable="@color/rippleColor"
|
||||||
|
android:state_activated="true" />
|
||||||
|
|
||||||
<item>
|
|
||||||
<color android:color="@color/dialog" />
|
|
||||||
</item>
|
|
||||||
</selector>
|
</selector>
|
||||||
</item>
|
</item>
|
||||||
</ripple>
|
</ripple>
|
||||||
|
@ -193,7 +193,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:text="@string/action_display_unread_badge"
|
android:text="@string/action_display_unread_text"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
@ -193,7 +193,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:text="@string/action_display_unread_badge"
|
android:text="@string/action_display_unread_text"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
@ -1,132 +1,169 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/manga_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?selectable_library_drawable">
|
android:layout_gravity="bottom">
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/constraint_layout"
|
||||||
android:layout_height="220dp"
|
|
||||||
android:id="@+id/card"
|
|
||||||
android:background="@drawable/card_background">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/thumbnail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?android:attr/colorBackground"
|
|
||||||
tools:background="?android:attr/colorBackground"
|
|
||||||
tools:src="@mipmap/ic_launcher"
|
|
||||||
tools:ignore="ContentDescription" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/gradient"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="@drawable/gradient_shape"/>
|
android:background="@drawable/library_item_selector"
|
||||||
|
android:minHeight="200dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/badge_layout"
|
android:id="@+id/card"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:layout_editor_absoluteY="7dp"
|
android:layout_gravity="bottom"
|
||||||
tools:layout_editor_absoluteX="7dp">
|
android:layout_marginTop="2dp"
|
||||||
<TextView
|
android:layout_marginStart="6dp"
|
||||||
android:id="@+id/unread_text"
|
android:layout_marginEnd="6dp"
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
app:layout_constraintBottom_toTopOf="@+id/title"
|
||||||
android:layout_width="wrap_content"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_height="wrap_content"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:background="@color/colorAccent"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
tools:text="120"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/download_text"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="4dp"/>
|
app:layout_constraintVertical_bias="1.0">
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/cover_thumbnail"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:background="?android:attr/colorBackground"
|
||||||
|
android:maxHeight="250dp"
|
||||||
|
app:layout_constrainedHeight="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:background="?android:attr/colorBackground"
|
||||||
|
tools:ignore="ContentDescription"
|
||||||
|
tools:src="@mipmap/ic_launcher" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_text"
|
android:id="@+id/download_text"
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
style="@style/TextAppearance.Regular.Caption.Light"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/md_red_500"
|
android:layout_marginStart="-10dp"
|
||||||
android:paddingBottom="1dp"
|
android:layout_marginTop="-10dp"
|
||||||
android:paddingStart="3dp"
|
android:background="@drawable/dialog_rounded_background"
|
||||||
android:paddingEnd="3dp"
|
android:backgroundTint="@color/md_red_500"
|
||||||
android:paddingTop="1dp"
|
android:gravity="start|center"
|
||||||
android:visibility="gone"
|
android:paddingStart="14dp"
|
||||||
tools:visibility="visible"
|
android:paddingTop="10dp"
|
||||||
tools:text="120"
|
android:paddingEnd="5dp"
|
||||||
|
android:paddingBottom="3dp"
|
||||||
android:textColor="@color/md_white_1000"
|
android:textColor="@color/md_white_1000"
|
||||||
app:layout_constraintStart_toEndOf="@+id/local_text"
|
android:textSize="13sp"
|
||||||
android:layout_marginStart="4dp"
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="4dp"/>
|
tools:text="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/local_text"
|
android:id="@+id/bookmark_text"
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
style="@style/TextAppearance.Regular.Caption.Light"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/md_teal_500"
|
android:layout_marginStart="-10dp"
|
||||||
|
android:layout_marginTop="-10dp"
|
||||||
|
android:background="@drawable/dialog_rounded_background"
|
||||||
|
android:backgroundTint="@color/md_blue_A400_87"
|
||||||
|
android:gravity="start|center"
|
||||||
|
android:paddingStart="14dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:paddingBottom="3dp"
|
||||||
|
android:text="@string/in_library"
|
||||||
android:textColor="@color/md_white_1000"
|
android:textColor="@color/md_white_1000"
|
||||||
android:paddingBottom="1dp"
|
android:textSize="13sp"
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="@string/local_source_badge"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="4dp"/>
|
tools:visibility="visible" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<eu.kanade.tachiyomi.widget.PTSansTextView
|
<FrameLayout
|
||||||
android:id="@+id/title"
|
android:id="@+id/play_layout"
|
||||||
style="@style/TextAppearance.Regular.Body1.Light"
|
android:layout_width="50dp"
|
||||||
app:typeface="ptsansNarrowBold"
|
android:layout_height="50dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_gravity="end|bottom"
|
||||||
android:textColor="@color/md_white_1000"
|
android:clickable="true"
|
||||||
android:layout_height="wrap_content"
|
android:focusable="true"
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:lineSpacingExtra="-4dp"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:padding="8dp"
|
|
||||||
android:shadowColor="@color/md_black_1000_87"
|
|
||||||
android:shadowDx="0"
|
|
||||||
android:shadowDy="0"
|
|
||||||
android:shadowRadius="4"
|
|
||||||
tools:text="Sample name"/>
|
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/progress"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="?android:attr/progressBarStyleSmall"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_gravity="center"/>
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/play_button"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|bottom"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_marginBottom="6dp"
|
||||||
|
android:padding="3dp"
|
||||||
|
android:background="@drawable/round_play_background"
|
||||||
|
android:contentDescription="@string/start_reading"
|
||||||
|
android:src="@drawable/ic_play_arrow_white_24dp"
|
||||||
|
android:tint="@android:color/white" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<ImageView
|
<ProgressBar
|
||||||
android:id="@+id/unread_badge"
|
android:id="@+id/progress"
|
||||||
android:layout_width="20dp"
|
style="?android:attr/progressBarStyleSmall"
|
||||||
android:layout_height="20dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_gravity="end"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:src="@drawable/unread_circle_badge"/>
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
style="@style/TextAppearance.Regular.Body1.Light"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lineSpacingExtra="-4dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/subtitle"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:text="Sample name" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/subtitle"
|
||||||
|
style="@style/TextAppearance.Regular.Body1.Light"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="14dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lineSpacingExtra="-4dp"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:text="Sample artist" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
@ -1,132 +1,145 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:background="?attr/selectable_list_drawable"
|
||||||
tools:layout_editor_absoluteY="25dp"
|
android:minHeight="@dimen/material_component_lists_single_line_with_avatar_height"
|
||||||
tools:layout_editor_absoluteX="0dp">
|
tools:layout_editor_absoluteX="0dp"
|
||||||
|
tools:layout_editor_absoluteY="25dp">
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/card"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
app:layout_constrainedHeight="true"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/thumbnail"
|
android:id="@+id/cover_thumbnail"
|
||||||
android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height"
|
android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height"
|
||||||
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
tools:src="@mipmap/ic_launcher"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:paddingTop="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:layout_marginStart="8dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
style="@style/TextAppearance.Regular.SubHeading"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:background="?android:attr/colorBackground"
|
||||||
|
android:maxHeight="150dp"
|
||||||
|
app:layout_constrainedHeight="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:background="?android:attr/colorBackground"
|
||||||
|
tools:ignore="ContentDescription"
|
||||||
|
tools:src="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress"
|
||||||
|
style="?android:attr/progressBarStyleSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
style="@style/TextAppearance.Regular.Body1.SemiBold"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="3"
|
||||||
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constrainedWidth="true"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/extras_layout"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/card"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="Manga title" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/subtitle"
|
||||||
|
style="@style/TextAppearance.Regular.Body1.Light"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_marginBottom="14dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
tools:text="Manga title"
|
android:singleLine="true"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:layout_marginTop="8dp"
|
android:textSize="14sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constrainedWidth="true"
|
||||||
android:layout_marginBottom="8dp"
|
app:layout_constraintEnd_toStartOf="@+id/extras_layout"
|
||||||
app:layout_constraintStart_toEndOf="@+id/thumbnail"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
android:layout_marginStart="8dp"
|
app:layout_constraintStart_toStartOf="@+id/title"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/local_text"
|
app:layout_constraintTop_toBottomOf="@+id/title"
|
||||||
android:layout_marginEnd="8dp"
|
app:layout_constraintVertical_bias="0.0"
|
||||||
app:layout_constraintVertical_bias="0.523"
|
tools:text="Manga artist" />
|
||||||
app:layout_constraintHorizontal_bias="0.007"/>
|
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/local_text"
|
android:id="@+id/extras_layout"
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:background="@color/md_teal_500"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="@string/local_source_badge"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
tools:visibility="visible"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/download_text"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginBottom="8dp"/>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/play_layout"
|
||||||
<TextView
|
android:layout_width="55dp"
|
||||||
android:id="@+id/download_text"
|
android:layout_height="match_parent"
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
android:layout_gravity="end|bottom"
|
||||||
android:textColor="@color/md_white_1000"
|
android:clickable="true"
|
||||||
android:layout_width="wrap_content"
|
android:focusable="true"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/md_red_500"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/unread_text"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:text="122"
|
|
||||||
tools:visibility="visible"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/unread_text"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginBottom="8dp"/>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/unread_text"
|
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/colorAccent"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="130"
|
|
||||||
tools:visibility="visible"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/unread_badge"
|
tools:visibility="visible">
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginEnd="8dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/unread_badge"
|
android:id="@+id/play_button"
|
||||||
android:layout_width="10dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="30dp"
|
||||||
android:visibility="gone"
|
android:layout_gravity="end|center"
|
||||||
tools:visibility="visible"
|
android:layout_marginEnd="12dp"
|
||||||
android:layout_gravity="end"
|
android:background="@drawable/round_play_background"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:contentDescription="@string/start_reading"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:padding="3dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:src="@drawable/ic_play_arrow_white_24dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:tint="@android:color/white" />
|
||||||
android:src="@drawable/unread_circle_badge"/>
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/bottom_line"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="6dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:barrierDirection="bottom"
|
||||||
|
app:constraint_referenced_ids="card,subtitle" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/padding"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="6dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/bottom_line" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -1,197 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout 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"
|
|
||||||
android:id="@+id/manga_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/constraint_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:background="@drawable/library_item_selector"
|
|
||||||
android:minHeight="200dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/card"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:layout_marginEnd="6dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintVertical_bias="1.0">
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/cover_thumbnail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:background="?android:attr/colorBackground"
|
|
||||||
android:maxHeight="250dp"
|
|
||||||
app:layout_constrainedHeight="true"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:background="?android:attr/colorBackground"
|
|
||||||
tools:ignore="ContentDescription"
|
|
||||||
tools:src="@mipmap/ic_launcher" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/badge_layout"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginTop="4dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/local_text"
|
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/md_teal_500"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:text="@string/local_source_badge"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/download_text"
|
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="-10dp"
|
|
||||||
android:layout_marginTop="-10dp"
|
|
||||||
android:background="@drawable/dialog_rounded_background"
|
|
||||||
android:backgroundTint="@color/md_red_500"
|
|
||||||
android:gravity="start|center"
|
|
||||||
android:paddingStart="14dp"
|
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:paddingBottom="3dp"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/local_text"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:text="1" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bookmark_text"
|
|
||||||
style="@style/TextAppearance.Regular.Caption.Light"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="-10dp"
|
|
||||||
android:layout_marginTop="-10dp"
|
|
||||||
android:background="@drawable/dialog_rounded_background"
|
|
||||||
android:backgroundTint="@color/md_blue_A400_87"
|
|
||||||
android:gravity="start|center"
|
|
||||||
android:paddingStart="14dp"
|
|
||||||
android:paddingTop="10dp"
|
|
||||||
android:paddingEnd="5dp"
|
|
||||||
android:paddingBottom="3dp"
|
|
||||||
android:text="@string/in_library"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/local_text"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/play_layout"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="end|bottom"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/play_button"
|
|
||||||
android:layout_width="30dp"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_gravity="end|bottom"
|
|
||||||
android:layout_marginEnd="6dp"
|
|
||||||
android:layout_marginBottom="6dp"
|
|
||||||
android:padding="3dp"
|
|
||||||
android:background="@drawable/round_play_background"
|
|
||||||
android:contentDescription="@string/start_reading"
|
|
||||||
android:src="@drawable/ic_play_arrow_white_24dp"
|
|
||||||
android:tint="@android:color/white" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/progress"
|
|
||||||
style="?android:attr/progressBarStyleSmall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
style="@style/TextAppearance.Regular.Body1.Light"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:layout_marginTop="6dp"
|
|
||||||
android:layout_marginEnd="6dp"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:lineSpacingExtra="-4dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/subtitle"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:text="Sample name\nsdf" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/subtitle"
|
|
||||||
style="@style/TextAppearance.Regular.Body1.Light"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="14dp"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:lineSpacingExtra="-4dp"
|
|
||||||
android:paddingStart="6dp"
|
|
||||||
android:paddingEnd="6dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:textSize="12sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:text="Sample artist" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</FrameLayout>
|
|
@ -8,4 +8,4 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:columnWidth="140dp"
|
android:columnWidth="140dp"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
tools:listitem="@layout/catalogue_mat_grid_item" />
|
tools:listitem="@layout/catalogue_grid_item" />
|
@ -190,7 +190,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:gravity="start|center"
|
android:gravity="start|center"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:text="@string/action_display_unread_badge"
|
android:text="@string/action_display_unread_text"
|
||||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<View
|
<View
|
||||||
android:id="@+id/shadow"
|
android:id="@+id/shadow"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="24dp"
|
||||||
android:background="@drawable/shape_gradient_top_shadow"
|
android:background="@drawable/shape_gradient_top_shadow"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
app:layout_anchorGravity="top"
|
app:layout_anchorGravity="top"
|
||||||
|
@ -178,7 +178,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:entries="@array/color_filter_modes"
|
android:entries="@array/color_filter_modes"
|
||||||
app:layout_constraintTop_toBottomOf="@id/seekbar_color_filter_alpha"
|
app:layout_constraintTop_toBottomOf="@id/seekbar_color_filter_alpha"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
||||||
|
|
||||||
<!-- Brightness -->
|
<!-- Brightness -->
|
||||||
@ -228,7 +228,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"/>
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/verticalcenter"
|
android:id="@+id/bottom_line"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/viewer_for_this_series"
|
android:text="@string/viewer_for_this_series"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/verticalcenter"
|
app:layout_constraintEnd_toStartOf="@id/bottom_line"
|
||||||
app:layout_constraintBaseline_toBaselineOf="@id/viewer" />
|
app:layout_constraintBaseline_toBaselineOf="@id/viewer" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSpinner
|
<androidx.appcompat.widget.AppCompatSpinner
|
||||||
@ -62,7 +62,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:entries="@array/viewers_selector"
|
android:entries="@array/viewers_selector"
|
||||||
app:layout_constraintTop_toBottomOf="@id/general_prefs"
|
app:layout_constraintTop_toBottomOf="@id/general_prefs"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -71,7 +71,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/pref_rotation_type"
|
android:text="@string/pref_rotation_type"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/verticalcenter"
|
app:layout_constraintEnd_toStartOf="@id/bottom_line"
|
||||||
app:layout_constraintBaseline_toBaselineOf="@id/rotation_mode" />
|
app:layout_constraintBaseline_toBaselineOf="@id/rotation_mode" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSpinner
|
<androidx.appcompat.widget.AppCompatSpinner
|
||||||
@ -81,7 +81,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:entries="@array/rotation_type"
|
android:entries="@array/rotation_type"
|
||||||
app:layout_constraintTop_toBottomOf="@id/viewer"
|
app:layout_constraintTop_toBottomOf="@id/viewer"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -99,7 +99,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:entries="@array/reader_themes"
|
android:entries="@array/reader_themes"
|
||||||
app:layout_constraintTop_toBottomOf="@id/rotation_mode"
|
app:layout_constraintTop_toBottomOf="@id/rotation_mode"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
@ -174,7 +174,7 @@
|
|||||||
android:id="@+id/zoom_start_text"
|
android:id="@+id/zoom_start_text"
|
||||||
android:text="@string/pref_image_scale_type"
|
android:text="@string/pref_image_scale_type"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/verticalcenter"
|
app:layout_constraintEnd_toStartOf="@id/bottom_line"
|
||||||
app:layout_constraintBaseline_toBaselineOf="@id/scale_type"/>
|
app:layout_constraintBaseline_toBaselineOf="@id/scale_type"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSpinner
|
<androidx.appcompat.widget.AppCompatSpinner
|
||||||
@ -183,7 +183,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:entries="@array/image_scale_type"
|
android:entries="@array/image_scale_type"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end"
|
app:layout_constraintEnd_toEndOf="@id/spinner_end"
|
||||||
app:layout_constraintTop_toBottomOf="@id/pager_prefs"/>
|
app:layout_constraintTop_toBottomOf="@id/pager_prefs"/>
|
||||||
|
|
||||||
@ -193,7 +193,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/pref_zoom_start"
|
android:text="@string/pref_zoom_start"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/verticalcenter"
|
app:layout_constraintEnd_toStartOf="@id/bottom_line"
|
||||||
app:layout_constraintBaseline_toBaselineOf="@id/zoom_start"/>
|
app:layout_constraintBaseline_toBaselineOf="@id/zoom_start"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatSpinner
|
<androidx.appcompat.widget.AppCompatSpinner
|
||||||
@ -203,7 +203,7 @@
|
|||||||
android:entries="@array/zoom_start"
|
android:entries="@array/zoom_start"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/scale_type"
|
app:layout_constraintTop_toBottomOf="@id/scale_type"
|
||||||
app:layout_constraintStart_toEndOf="@id/verticalcenter"
|
app:layout_constraintStart_toEndOf="@id/bottom_line"
|
||||||
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
app:layout_constraintEnd_toEndOf="@id/spinner_end" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
@ -266,7 +266,7 @@
|
|||||||
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon" />
|
app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/verticalcenter"
|
android:id="@+id/bottom_line"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
@ -4,12 +4,14 @@
|
|||||||
<color name="colorPrimary">#212121</color>
|
<color name="colorPrimary">#212121</color>
|
||||||
<color name="colorPrimaryDark">#212121</color>
|
<color name="colorPrimaryDark">#212121</color>
|
||||||
|
|
||||||
|
|
||||||
<color name="drawerHighlight">@color/md_white_1000_12</color>
|
<color name="drawerHighlight">@color/md_white_1000_12</color>
|
||||||
<color name="drawerPrimary">#3399FF</color>
|
<color name="drawerPrimary">#3399FF</color>
|
||||||
<color name="oldNavBarBackground">#B3000000</color>
|
<color name="oldNavBarBackground">#B3000000</color>
|
||||||
<color name="snackbarBackground">#FFFFFF</color>
|
<color name="snackbarBackground">#FFFFFF</color>
|
||||||
<color name="cardBackground">#212121</color>
|
<color name="cardBackground">#212121</color>
|
||||||
<color name="rippleColor">@color/md_white_1000_20</color>
|
<color name="rippleColor">@color/md_white_1000_20</color>
|
||||||
|
<color name="fullRippleColor">#707070</color>
|
||||||
<color name="dialogBackground">@color/md_grey_800</color>
|
<color name="dialogBackground">@color/md_grey_800</color>
|
||||||
<color name="colorAccent">#3399FF</color>
|
<color name="colorAccent">#3399FF</color>
|
||||||
<color name="purePrimary">#212121</color>
|
<color name="purePrimary">#212121</color>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<item name="snackbar_text">@color/textColorPrimary</item>
|
<item name="snackbar_text">@color/textColorPrimary</item>
|
||||||
|
|
||||||
<!-- Custom Attributes-->
|
<!-- Custom Attributes-->
|
||||||
<item name="selectable_list_drawable">@drawable/list_item_selector_amoled</item>
|
<item name="selectable_list_drawable">@drawable/list_item_selector</item>
|
||||||
<item name="selectable_library_drawable">@drawable/library_item_selector_amoled</item>
|
<item name="selectable_library_drawable">@drawable/library_item_selector_amoled</item>
|
||||||
<item name="background_card">@color/dialog_amoled</item>
|
<item name="background_card">@color/dialog_amoled</item>
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<color name="snackbarBackground">#323232</color>
|
<color name="snackbarBackground">#323232</color>
|
||||||
<color name="trueSnackbarBackground">#323232</color>
|
<color name="trueSnackbarBackground">#323232</color>
|
||||||
<color name="dialogBackground">@color/md_white_1000</color>
|
<color name="dialogBackground">@color/md_white_1000</color>
|
||||||
|
<color name="fullRippleColor">#C2C2C2</color>
|
||||||
<color name="rippleColor">@color/md_black_1000_12</color>
|
<color name="rippleColor">@color/md_black_1000_12</color>
|
||||||
<color name="colorAccent">@color/md_blue_A400</color>
|
<color name="colorAccent">@color/md_blue_A400</color>
|
||||||
<color name="actionModeShadow">@color/md_black_1000_38</color>
|
<color name="actionModeShadow">@color/md_black_1000_38</color>
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
<string name="action_display_grid">Grid</string>
|
<string name="action_display_grid">Grid</string>
|
||||||
<string name="action_display_list">List</string>
|
<string name="action_display_list">List</string>
|
||||||
<string name="action_display_download_badge">Download badges</string>
|
<string name="action_display_download_badge">Download badges</string>
|
||||||
<string name="action_display_unread_badge">Unread badges</string>
|
<string name="action_display_unread_text">Unread text</string>
|
||||||
<string name="action_display_all_unread">All unread</string>
|
<string name="action_display_all_unread">All unread</string>
|
||||||
<string name="action_display_any_unread">Any unread</string>
|
<string name="action_display_any_unread">Any unread</string>
|
||||||
<string name="action_display_hide_unread">Hide unread</string>
|
<string name="action_display_hide_unread">Hide unread</string>
|
||||||
@ -197,8 +197,7 @@
|
|||||||
<string name="pref_auto_update_manga_sync">Sync chapters after reading</string>
|
<string name="pref_auto_update_manga_sync">Sync chapters after reading</string>
|
||||||
<string name="pref_remove_articles">Sort by ignoring articles</string>
|
<string name="pref_remove_articles">Sort by ignoring articles</string>
|
||||||
<string name="pref_fixed_grid">Fixed grid size in library</string>
|
<string name="pref_fixed_grid">Fixed grid size in library</string>
|
||||||
<string name="pref_fixed_grid_summary">Show all covers as the same height by cropping (improves
|
<string name="pref_fixed_grid_summary">Show all covers as the same height by cropping</string>
|
||||||
fast scrolling performance)</string>
|
|
||||||
<string name="pref_remove_articles_summary">When sorting alphabetically, sort ignoring
|
<string name="pref_remove_articles_summary">When sorting alphabetically, sort ignoring
|
||||||
articles (a, an, the) at the start of manga titles</string>
|
articles (a, an, the) at the start of manga titles</string>
|
||||||
<string name="pref_skip_pre_migration">Skip pre-migration</string>
|
<string name="pref_skip_pre_migration">Skip pre-migration</string>
|
||||||
@ -414,10 +413,14 @@
|
|||||||
<string name="confirm_manga_deletion">Remove from library?</string>
|
<string name="confirm_manga_deletion">Remove from library?</string>
|
||||||
<plurals name="unread_count">
|
<plurals name="unread_count">
|
||||||
<item quantity="one">New chapter</item>
|
<item quantity="one">New chapter</item>
|
||||||
<item quantity="other">%d Unread</item>
|
<item quantity="other">%d unread</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="new_chapter">New</string>
|
<string name="new_chapter">New</string>
|
||||||
<string name="start_reading">Start Reading</string>
|
<string name="start_reading">Start Reading</string>
|
||||||
|
<plurals name="download_count">
|
||||||
|
<item quantity="one">1 downloaded</item>
|
||||||
|
<item quantity="other">%d downloaded</item>
|
||||||
|
</plurals>
|
||||||
|
|
||||||
<!-- Catalogue fragment -->
|
<!-- Catalogue fragment -->
|
||||||
<string name="source_search_options">Search filters</string>
|
<string name="source_search_options">Search filters</string>
|
||||||
|
@ -56,6 +56,10 @@
|
|||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="TextAppearance.Regular.Body1.SemiBold">
|
||||||
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="TextAppearance.Regular.Body1.Light">
|
<style name="TextAppearance.Regular.Body1.Light">
|
||||||
<item name="android:textColor">@color/textColorPrimary</item>
|
<item name="android:textColor">@color/textColorPrimary</item>
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user