More tweaks to delegated manga views
This commit is contained in:
parent
105302aa7b
commit
079405c17e
@ -1,5 +1,6 @@
|
||||
package exh.ui.metadata.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@ -13,7 +14,6 @@ import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import exh.metadata.EX_DATE_FORMAT
|
||||
import exh.metadata.humanReadableByteCount
|
||||
import exh.metadata.metadata.EHentaiSearchMetadata
|
||||
import exh.ui.metadata.MetadataViewController
|
||||
@ -25,7 +25,6 @@ import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.android.view.longClicks
|
||||
import java.util.Date
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class EHentaiDescriptionAdapter(
|
||||
@ -77,19 +76,27 @@ class EHentaiDescriptionAdapter(
|
||||
binding.visible.text = itemView.context.getString(R.string.is_visible, meta.visible ?: itemView.context.getString(R.string.unknown))
|
||||
|
||||
binding.favorites.text = (meta.favorites ?: 0).toString()
|
||||
val drawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_book_24dp)
|
||||
drawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.favorites.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)
|
||||
|
||||
binding.whenPosted.text = EX_DATE_FORMAT.format(Date(meta.datePosted ?: 0))
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_book_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.favorites.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.uploader.text = meta.uploader ?: itemView.context.getString(R.string.unknown)
|
||||
|
||||
binding.size.text = humanReadableByteCount(meta.size ?: 0, true)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_outline_sd_card_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.size.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.pages.text = itemView.resources.getQuantityString(R.plurals.num_pages, meta.length ?: 0, meta.length ?: 0)
|
||||
val pagesDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)
|
||||
pagesDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.pages.setCompoundDrawablesWithIntrinsicBounds(pagesDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.pages.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
val language = meta.language ?: itemView.context.getString(R.string.unknown)
|
||||
binding.language.text = if (meta.translated == true) {
|
||||
@ -114,16 +121,14 @@ class EHentaiDescriptionAdapter(
|
||||
else -> R.string.no_rating
|
||||
}
|
||||
binding.ratingBar.rating = ratingFloat ?: 0F
|
||||
binding.rating.text = if (meta.ratingCount != null) {
|
||||
itemView.context.getString(R.string.rating_view, itemView.context.getString(name), (ratingFloat ?: 0F).toString(), meta.ratingCount ?: 0)
|
||||
} else {
|
||||
itemView.context.getString(R.string.rating_view_no_count, itemView.context.getString(name), (ratingFloat ?: 0F).toString())
|
||||
}
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.rating.text = (ratingFloat ?: 0F).toString() + " - " + itemView.context.getString(name)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
listOf(
|
||||
binding.favorites,
|
||||
@ -131,10 +136,8 @@ class EHentaiDescriptionAdapter(
|
||||
binding.language,
|
||||
binding.pages,
|
||||
binding.rating,
|
||||
binding.size,
|
||||
binding.uploader,
|
||||
binding.visible,
|
||||
binding.whenPosted
|
||||
binding.visible
|
||||
).forEach { textView ->
|
||||
textView.longClicks()
|
||||
.onEach {
|
||||
|
@ -48,10 +48,11 @@ class EightMusesDescriptionAdapter(
|
||||
|
||||
binding.title.text = meta.title ?: itemView.context.getString(R.string.unknown)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.title.longClicks()
|
||||
.onEach {
|
||||
|
@ -47,14 +47,17 @@ class HBrowseDescriptionAdapter(
|
||||
if (meta == null || meta !is HBrowseSearchMetadata) return
|
||||
|
||||
binding.pages.text = itemView.resources.getQuantityString(R.plurals.num_pages, meta.length ?: 0, meta.length ?: 0)
|
||||
val pagesDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)
|
||||
pagesDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.pages.setCompoundDrawablesWithIntrinsicBounds(pagesDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.pages.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.pages.longClicks()
|
||||
.onEach {
|
||||
|
@ -48,10 +48,11 @@ class HentaiCafeDescriptionAdapter(
|
||||
|
||||
binding.artist.text = meta.artist ?: itemView.context.getString(R.string.unknown)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.artist.longClicks()
|
||||
.onEach {
|
||||
|
@ -76,10 +76,11 @@ class HitomiDescriptionAdapter(
|
||||
binding.group.text = meta.group ?: itemView.context.getString(R.string.unknown)
|
||||
binding.language.text = meta.language ?: itemView.context.getString(R.string.unknown)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
listOf(
|
||||
binding.genre,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package exh.ui.metadata.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -21,6 +22,7 @@ import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.android.view.longClicks
|
||||
import kotlin.math.round
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class MangaDexDescriptionAdapter(
|
||||
@ -63,17 +65,16 @@ class MangaDexDescriptionAdapter(
|
||||
10 -> R.string.rating10
|
||||
else -> R.string.no_rating
|
||||
}
|
||||
binding.ratingBar.rating = ratingFloat ?: 0F
|
||||
binding.rating.text = if (meta.users?.toIntOrNull() != null) {
|
||||
itemView.context.getString(R.string.rating_view, itemView.context.getString(name), (meta.rating?.toFloatOrNull() ?: 0F).toString(), meta.users?.toIntOrNull() ?: 0)
|
||||
} else {
|
||||
itemView.context.getString(R.string.rating_view_no_count, itemView.context.getString(name), (meta.rating?.toFloatOrNull() ?: 0F).toString())
|
||||
}
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
binding.ratingBar.rating = ratingFloat ?: 0F
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.rating.text = (round((meta.rating?.toFloatOrNull() ?: 0F) * 100.0) / 100.0).toString() + " - " + itemView.context.getString(name)
|
||||
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.rating.longClicks()
|
||||
.onEach {
|
||||
|
@ -82,26 +82,30 @@ class NHentaiDescriptionAdapter(
|
||||
if (it == 0L) return@let
|
||||
binding.favorites.text = it.toString()
|
||||
|
||||
val drawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_favorite_24dp)
|
||||
drawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
|
||||
binding.favorites.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_book_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.favorites.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
}
|
||||
|
||||
binding.whenPosted.text = EX_DATE_FORMAT.format(Date((meta.uploadDate ?: 0) * 1000))
|
||||
|
||||
binding.pages.text = itemView.resources.getQuantityString(R.plurals.num_pages, meta.pageImageTypes.size, meta.pageImageTypes.size)
|
||||
val pagesDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)
|
||||
pagesDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.pages.setCompoundDrawablesWithIntrinsicBounds(pagesDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.pages.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.id.text = "#" + (meta.nhId ?: 0)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
listOf(
|
||||
binding.favorites,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package exh.ui.metadata.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@ -24,6 +25,7 @@ import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.android.view.longClicks
|
||||
import java.util.Locale
|
||||
import kotlin.math.round
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class PervEdenDescriptionAdapter(
|
||||
@ -88,12 +90,14 @@ class PervEdenDescriptionAdapter(
|
||||
else -> R.string.no_rating
|
||||
}
|
||||
binding.ratingBar.rating = meta.rating ?: 0F
|
||||
binding.rating.text = itemView.context.getString(R.string.rating_view_no_count, itemView.context.getString(name), (meta.rating ?: 0F).toString())
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.rating.text = (round((meta.rating ?: 0F) * 100.0) / 100.0).toString() + " - " + itemView.context.getString(name)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
listOf(
|
||||
binding.genre,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package exh.ui.metadata.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@ -24,6 +25,7 @@ import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.android.view.longClicks
|
||||
import kotlin.math.round
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class PururinDescriptionAdapter(
|
||||
@ -69,12 +71,20 @@ class PururinDescriptionAdapter(
|
||||
} else binding.genre.setText(R.string.unknown)
|
||||
|
||||
binding.uploader.text = meta.uploaderDisp ?: meta.uploader ?: ""
|
||||
|
||||
binding.size.text = meta.fileSize ?: itemView.context.getString(R.string.unknown)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_outline_sd_card_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.size.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.pages.text = itemView.resources.getQuantityString(R.plurals.num_pages, meta.pages ?: 0, meta.pages ?: 0)
|
||||
val pagesDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)
|
||||
pagesDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.pages.setCompoundDrawablesWithIntrinsicBounds(pagesDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.pages.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
val ratingFloat = meta.averageRating?.toFloat()
|
||||
val name = when (((ratingFloat ?: 100F) * 2).roundToInt()) {
|
||||
@ -92,17 +102,14 @@ class PururinDescriptionAdapter(
|
||||
else -> R.string.no_rating
|
||||
}
|
||||
binding.ratingBar.rating = ratingFloat ?: 0F
|
||||
binding.rating.text = if (meta.ratingCount != null) {
|
||||
itemView.context.getString(R.string.rating_view, itemView.context.getString(name), (ratingFloat ?: 0F).toString(), meta.ratingCount ?: 0)
|
||||
} else {
|
||||
itemView.context.getString(R.string.rating_view_no_count, itemView.context.getString(name), (ratingFloat ?: 0F).toString())
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.rating.text = (round((ratingFloat ?: 0F) * 100.0) / 100.0).toString() + " - " + itemView.context.getString(name)
|
||||
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
|
||||
listOf(
|
||||
binding.genre,
|
||||
binding.pages,
|
||||
|
@ -1,5 +1,6 @@
|
||||
package exh.ui.metadata.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@ -24,6 +25,7 @@ import kotlinx.coroutines.flow.onEach
|
||||
import reactivecircus.flowbinding.android.view.clicks
|
||||
import reactivecircus.flowbinding.android.view.longClicks
|
||||
import java.util.Date
|
||||
import kotlin.math.round
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class TsuminoDescriptionAdapter(
|
||||
@ -68,18 +70,22 @@ class TsuminoDescriptionAdapter(
|
||||
} else binding.genre.setText(R.string.unknown)
|
||||
|
||||
binding.favorites.text = (meta.favorites ?: 0).toString()
|
||||
val drawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_favorite_24dp)
|
||||
drawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.favorites.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_book_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.favorites.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
binding.whenPosted.text = TsuminoSearchMetadata.TSUMINO_DATE_FORMAT.format(Date(meta.uploadDate ?: 0))
|
||||
|
||||
binding.uploader.text = meta.uploader ?: itemView.context.getString(R.string.unknown)
|
||||
|
||||
binding.pages.text = itemView.resources.getQuantityString(R.plurals.num_pages, meta.length ?: 0, meta.length ?: 0)
|
||||
val pagesDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)
|
||||
pagesDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
binding.pages.setCompoundDrawablesWithIntrinsicBounds(pagesDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_baseline_menu_book_24)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.pages.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
val name = when (((meta.averageRating ?: 100F) * 2).roundToInt()) {
|
||||
0 -> R.string.rating0
|
||||
@ -96,16 +102,14 @@ class TsuminoDescriptionAdapter(
|
||||
else -> R.string.no_rating
|
||||
}
|
||||
binding.ratingBar.rating = meta.averageRating ?: 0F
|
||||
binding.rating.text = if (meta.userRatings != null) {
|
||||
itemView.context.getString(R.string.rating_view, itemView.context.getString(name), (meta.averageRating ?: 0F).toString(), meta.userRatings ?: 0L)
|
||||
} else {
|
||||
itemView.context.getString(R.string.rating_view_no_count, itemView.context.getString(name), (meta.averageRating ?: 0F).toString())
|
||||
}
|
||||
@SuppressLint("SetTextI18n")
|
||||
binding.rating.text = (round((meta.averageRating ?: 0F) * 100.0) / 100.0).toString() + " - " + itemView.context.getString(name)
|
||||
|
||||
val infoDrawable = ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)
|
||||
infoDrawable?.setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
infoDrawable?.setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(infoDrawable, null, null, null)
|
||||
ContextCompat.getDrawable(itemView.context, R.drawable.ic_info_24dp)?.apply {
|
||||
setTint(itemView.context.getResourceColor(R.attr.colorAccent))
|
||||
setBounds(0, 0, 20.dpToPx, 20.dpToPx)
|
||||
binding.moreInfo.setCompoundDrawables(this, null, null, null)
|
||||
}
|
||||
|
||||
listOf(
|
||||
binding.favorites,
|
||||
|
10
app/src/main/res/drawable/ic_outline_sd_card_24.xml
Normal file
10
app/src/main/res/drawable/ic_outline_sd_card_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,2h-8L4,8v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,4c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,8.83L10.83,4L18,4v16zM9,7h2v4L9,11zM12,7h2v4h-2zM15,7h2v4h-2z"/>
|
||||
</vector>
|
@ -21,7 +21,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -59,14 +59,50 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rating_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:focusable="false"
|
||||
android:isIndicator="true"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rating_bar" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/language"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/rating_layout" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/size"
|
||||
@ -74,28 +110,19 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rating_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/rating_layout" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/favorites"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/language" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/when_posted"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/language"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/size" />
|
||||
app:layout_constraintTop_toTopOf="@+id/language" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -106,51 +133,21 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/favorites" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/language" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/uploader"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/when_posted" />
|
||||
app:layout_constraintTop_toTopOf="@+id/visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:focusable="false"
|
||||
android:isIndicator="true"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rating_bar" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -1,34 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/pages"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/pages"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<Button
|
||||
android:id="@+id/more_info"
|
||||
style="@style/Theme.Widget.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/more_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/more_info"
|
||||
style="@style/Theme.Widget.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/more_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,34 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/artist"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/artist"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<Button
|
||||
android:id="@+id/more_info"
|
||||
style="@style/Theme.Widget.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/more_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/more_info"
|
||||
style="@style/Theme.Widget.Button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/more_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -21,7 +21,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -62,8 +62,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/language"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/language" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -71,10 +72,10 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/language" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
@ -21,7 +21,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -65,6 +65,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@ -73,6 +74,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -83,6 +85,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -32,7 +32,6 @@
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/more_info"
|
||||
style="@style/Theme.Widget.Button"
|
||||
@ -55,34 +54,27 @@
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_height="20dp"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5"
|
||||
android:isIndicator="true"
|
||||
android:focusable="false"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:focusable="false" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
android:layout_marginStart="8dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -21,7 +21,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -65,43 +65,46 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/size"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/size" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/size"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5"
|
||||
android:isIndicator="true"
|
||||
android:focusable="false"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/uploader" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/size" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/uploader">
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:focusable="false"
|
||||
android:isIndicator="true"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
@ -22,7 +21,7 @@
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/genre"
|
||||
style="@style/TextAppearance.Regular"
|
||||
style="@style/TextAppearance.Regular.Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
@ -65,9 +64,10 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/uploader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/uploader" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/when_posted"
|
||||
@ -75,8 +75,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/uploader"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/uploader" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
@ -84,34 +85,36 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="16dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5"
|
||||
android:isIndicator="true"
|
||||
android:focusable="false"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/uploader" />
|
||||
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/when_posted" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/favorites">
|
||||
|
||||
<me.zhanghai.android.materialratingbar.MaterialRatingBar
|
||||
android:id="@+id/rating_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:focusable="false"
|
||||
android:isIndicator="true"
|
||||
android:numStars="5"
|
||||
android:stepSize="0.5" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/rating"
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="8dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@ -518,8 +518,6 @@
|
||||
</plurals>
|
||||
<string name="tags">Tags</string>
|
||||
<string name="is_visible">Visible: %1$s</string>
|
||||
<string name="rating_view">%1$s (%2$s, %3$d)</string>
|
||||
<string name="rating_view_no_count">%1$s (%2$s)</string>
|
||||
<string name="language_translated">%1$s TR</string>
|
||||
|
||||
<!-- Enhanced E/ExHentai Browse View -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user