mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-26 19:08:25 +01:00
[5893] - Implemented Language Badge (#6050)
* Implemented language badge on library items * Added left margin for better viewing the badge on list view * Adjusting borders on badges, cleaning string interpolation and cleaning code * Improving readability on Holders and removing unused background and text on grid items
This commit is contained in:
parent
f32f1eeaa5
commit
918502742d
@ -197,6 +197,8 @@ object PreferenceKeys {
|
|||||||
|
|
||||||
const val unreadBadge = "display_unread_badge"
|
const val unreadBadge = "display_unread_badge"
|
||||||
|
|
||||||
|
const val languageBadge = "display_language_badge"
|
||||||
|
|
||||||
const val localBadge = "display_local_badge"
|
const val localBadge = "display_local_badge"
|
||||||
|
|
||||||
const val categoryTabs = "display_category_tabs"
|
const val categoryTabs = "display_category_tabs"
|
||||||
|
@ -253,6 +253,8 @@ class PreferencesHelper(val context: Context) {
|
|||||||
|
|
||||||
fun unreadBadge() = flowPrefs.getBoolean(Keys.unreadBadge, true)
|
fun unreadBadge() = flowPrefs.getBoolean(Keys.unreadBadge, true)
|
||||||
|
|
||||||
|
fun languageBadge() = flowPrefs.getBoolean(Keys.languageBadge, false)
|
||||||
|
|
||||||
fun categoryTabs() = flowPrefs.getBoolean(Keys.categoryTabs, true)
|
fun categoryTabs() = flowPrefs.getBoolean(Keys.categoryTabs, true)
|
||||||
|
|
||||||
fun categoryNumberOfItems() = flowPrefs.getBoolean(Keys.categoryNumberOfItems, false)
|
fun categoryNumberOfItems() = flowPrefs.getBoolean(Keys.categoryNumberOfItems, false)
|
||||||
|
@ -39,7 +39,8 @@ class SourceComfortableGridHolder(private val view: View, private val adapter: F
|
|||||||
binding.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
binding.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
||||||
|
|
||||||
// For rounded corners
|
// For rounded corners
|
||||||
binding.badges.clipToOutline = true
|
binding.leftBadges.clipToOutline = true
|
||||||
|
binding.rightBadges.clipToOutline = true
|
||||||
|
|
||||||
// Set favorite badge
|
// Set favorite badge
|
||||||
binding.favoriteText.isVisible = manga.favorite
|
binding.favoriteText.isVisible = manga.favorite
|
||||||
|
@ -39,7 +39,8 @@ open class SourceGridHolder(private val view: View, private val adapter: Flexibl
|
|||||||
binding.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
binding.thumbnail.alpha = if (manga.favorite) 0.3f else 1.0f
|
||||||
|
|
||||||
// For rounded corners
|
// For rounded corners
|
||||||
binding.badges.clipToOutline = true
|
binding.leftBadges.clipToOutline = true
|
||||||
|
binding.rightBadges.clipToOutline = true
|
||||||
|
|
||||||
// Set favorite badge
|
// Set favorite badge
|
||||||
binding.favoriteText.isVisible = manga.favorite
|
binding.favoriteText.isVisible = manga.favorite
|
||||||
|
@ -36,7 +36,8 @@ class LibraryComfortableGridHolder(
|
|||||||
binding.title.text = item.manga.title
|
binding.title.text = item.manga.title
|
||||||
|
|
||||||
// For rounded corners
|
// For rounded corners
|
||||||
binding.badges.clipToOutline = true
|
binding.leftBadges.clipToOutline = true
|
||||||
|
binding.rightBadges.clipToOutline = true
|
||||||
|
|
||||||
// Update the unread count and its visibility.
|
// Update the unread count and its visibility.
|
||||||
with(binding.unreadText) {
|
with(binding.unreadText) {
|
||||||
@ -48,6 +49,11 @@ class LibraryComfortableGridHolder(
|
|||||||
isVisible = item.downloadCount > 0
|
isVisible = item.downloadCount > 0
|
||||||
text = item.downloadCount.toString()
|
text = item.downloadCount.toString()
|
||||||
}
|
}
|
||||||
|
// Update the source language and its visibility
|
||||||
|
with(binding.languageText) {
|
||||||
|
isVisible = item.sourceLanguage.isNotEmpty()
|
||||||
|
text = item.sourceLanguage
|
||||||
|
}
|
||||||
// set local visibility if its local manga
|
// set local visibility if its local manga
|
||||||
binding.localText.isVisible = item.isLocal
|
binding.localText.isVisible = item.isLocal
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ open class LibraryCompactGridHolder(
|
|||||||
binding.title.text = item.manga.title
|
binding.title.text = item.manga.title
|
||||||
|
|
||||||
// For rounded corners
|
// For rounded corners
|
||||||
binding.badges.clipToOutline = true
|
binding.leftBadges.clipToOutline = true
|
||||||
|
binding.rightBadges.clipToOutline = true
|
||||||
|
|
||||||
// Update the unread count and its visibility.
|
// Update the unread count and its visibility.
|
||||||
with(binding.unreadText) {
|
with(binding.unreadText) {
|
||||||
@ -46,6 +47,11 @@ open class LibraryCompactGridHolder(
|
|||||||
isVisible = item.downloadCount > 0
|
isVisible = item.downloadCount > 0
|
||||||
text = item.downloadCount.toString()
|
text = item.downloadCount.toString()
|
||||||
}
|
}
|
||||||
|
// Update the source language and its visibility
|
||||||
|
with(binding.languageText) {
|
||||||
|
isVisible = item.sourceLanguage.isNotEmpty()
|
||||||
|
text = item.sourceLanguage
|
||||||
|
}
|
||||||
// set local visibility if its local manga
|
// set local visibility if its local manga
|
||||||
binding.localText.isVisible = item.isLocal
|
binding.localText.isVisible = item.isLocal
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ class LibraryItem(
|
|||||||
var downloadCount = -1
|
var downloadCount = -1
|
||||||
var unreadCount = -1
|
var unreadCount = -1
|
||||||
var isLocal = false
|
var isLocal = false
|
||||||
|
var sourceLanguage = ""
|
||||||
|
|
||||||
private fun getDisplayMode(): DisplayModeSetting {
|
private fun getDisplayMode(): DisplayModeSetting {
|
||||||
return if (shouldSetFromCategory.get() && manga.category != 0) {
|
return if (shouldSetFromCategory.get() && manga.category != 0) {
|
||||||
|
@ -46,6 +46,11 @@ class LibraryListHolder(
|
|||||||
isVisible = item.downloadCount > 0
|
isVisible = item.downloadCount > 0
|
||||||
text = "${item.downloadCount}"
|
text = "${item.downloadCount}"
|
||||||
}
|
}
|
||||||
|
// Update the source language and its visibility
|
||||||
|
with(binding.languageText) {
|
||||||
|
isVisible = item.sourceLanguage.isNotEmpty()
|
||||||
|
text = item.sourceLanguage
|
||||||
|
}
|
||||||
// show local text badge if local manga
|
// show local text badge if local manga
|
||||||
binding.localText.isVisible = item.isLocal
|
binding.localText.isVisible = item.isLocal
|
||||||
|
|
||||||
|
@ -200,6 +200,7 @@ class LibraryPresenter(
|
|||||||
val showDownloadBadges = preferences.downloadBadge().get()
|
val showDownloadBadges = preferences.downloadBadge().get()
|
||||||
val showUnreadBadges = preferences.unreadBadge().get()
|
val showUnreadBadges = preferences.unreadBadge().get()
|
||||||
val showLocalBadges = preferences.localBadge().get()
|
val showLocalBadges = preferences.localBadge().get()
|
||||||
|
val showLanguageBadges = preferences.languageBadge().get()
|
||||||
|
|
||||||
for ((_, itemList) in map) {
|
for ((_, itemList) in map) {
|
||||||
for (item in itemList) {
|
for (item in itemList) {
|
||||||
@ -223,6 +224,13 @@ class LibraryPresenter(
|
|||||||
// Hide / Unset local badge if not enabled
|
// Hide / Unset local badge if not enabled
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
item.sourceLanguage = if (showLanguageBadges) {
|
||||||
|
sourceManager.getOrStub(item.manga.source).lang.uppercase()
|
||||||
|
} else {
|
||||||
|
// Unset source language if not enabled
|
||||||
|
""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,15 +367,17 @@ class LibrarySettingsSheet(
|
|||||||
private val downloadBadge = Item.CheckboxGroup(R.string.action_display_download_badge, this)
|
private val downloadBadge = Item.CheckboxGroup(R.string.action_display_download_badge, this)
|
||||||
private val unreadBadge = Item.CheckboxGroup(R.string.action_display_unread_badge, this)
|
private val unreadBadge = Item.CheckboxGroup(R.string.action_display_unread_badge, this)
|
||||||
private val localBadge = Item.CheckboxGroup(R.string.action_display_local_badge, this)
|
private val localBadge = Item.CheckboxGroup(R.string.action_display_local_badge, this)
|
||||||
|
private val languageBadge = Item.CheckboxGroup(R.string.action_display_language_badge, this)
|
||||||
|
|
||||||
override val header = Item.Header(R.string.badges_header)
|
override val header = Item.Header(R.string.badges_header)
|
||||||
override val items = listOf(downloadBadge, unreadBadge, localBadge)
|
override val items = listOf(downloadBadge, unreadBadge, localBadge, languageBadge)
|
||||||
override val footer = null
|
override val footer = null
|
||||||
|
|
||||||
override fun initModels() {
|
override fun initModels() {
|
||||||
downloadBadge.checked = preferences.downloadBadge().get()
|
downloadBadge.checked = preferences.downloadBadge().get()
|
||||||
unreadBadge.checked = preferences.unreadBadge().get()
|
unreadBadge.checked = preferences.unreadBadge().get()
|
||||||
localBadge.checked = preferences.localBadge().get()
|
localBadge.checked = preferences.localBadge().get()
|
||||||
|
languageBadge.checked = preferences.languageBadge().get()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onItemClicked(item: Item) {
|
override fun onItemClicked(item: Item) {
|
||||||
@ -385,6 +387,7 @@ class LibrarySettingsSheet(
|
|||||||
downloadBadge -> preferences.downloadBadge().set((item.checked))
|
downloadBadge -> preferences.downloadBadge().set((item.checked))
|
||||||
unreadBadge -> preferences.unreadBadge().set((item.checked))
|
unreadBadge -> preferences.unreadBadge().set((item.checked))
|
||||||
localBadge -> preferences.localBadge().set((item.checked))
|
localBadge -> preferences.localBadge().set((item.checked))
|
||||||
|
languageBadge -> preferences.languageBadge().set((item.checked))
|
||||||
}
|
}
|
||||||
adapter.notifyItemChanged(item)
|
adapter.notifyItemChanged(item)
|
||||||
}
|
}
|
||||||
|
@ -37,74 +37,109 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:background="@drawable/rounded_rectangle">
|
android:layout_marginEnd="4dp">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/local_text"
|
android:id="@+id/left_badges"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorTertiary"
|
android:background="@drawable/rounded_rectangle">
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:text="@string/local_source_badge"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnTertiary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_text"
|
android:id="@+id/local_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:text="@string/local_source_badge"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/download_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="120"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/unread_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnSecondary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="120"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/favorite_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:text="@string/in_library"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnSecondary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/right_badges"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorTertiary"
|
android:background="@drawable/rounded_rectangle">
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnTertiary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="120"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/unread_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorSecondary"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="120"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/favorite_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorSecondary"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:text="@string/in_library"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/language_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
tools:text="EN"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
android:id="@+id/progress"
|
android:id="@+id/progress"
|
||||||
style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small"
|
style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small"
|
||||||
|
@ -36,72 +36,106 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:background="@drawable/rounded_rectangle">
|
android:layout_marginEnd="4dp">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/local_text"
|
android:id="@+id/left_badges"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorTertiary"
|
android:background="@drawable/rounded_rectangle">
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:text="@string/local_source_badge"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnTertiary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/download_text"
|
android:id="@+id/local_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@string/local_source_badge"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/download_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="120"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/unread_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondary"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnSecondary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="120"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/favorite_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorSecondary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
android:text="@string/in_library"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnSecondary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/right_badges"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/colorTertiary"
|
android:background="@drawable/rounded_rectangle">
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnTertiary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="120"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/unread_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorSecondary"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="120"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/favorite_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/colorSecondary"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingTop="1dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:paddingBottom="1dp"
|
|
||||||
android:text="@string/in_library"
|
|
||||||
android:textAppearance="?attr/textAppearanceCaption"
|
|
||||||
android:textColor="?attr/colorOnSecondary"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/language_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
tools:text="EN"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -112,6 +112,22 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/language_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/colorTertiary"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingTop="1dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
|
android:paddingBottom="1dp"
|
||||||
|
tools:text="EN"
|
||||||
|
android:textAppearance="?attr/textAppearanceCaption"
|
||||||
|
android:textColor="?attr/colorOnTertiary"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -93,6 +93,7 @@
|
|||||||
<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_badge">Unread badges</string>
|
||||||
<string name="action_display_local_badge">Local badges</string>
|
<string name="action_display_local_badge">Local badges</string>
|
||||||
|
<string name="action_display_language_badge">Language badges</string>
|
||||||
<string name="action_display_show_tabs">Show category tabs</string>
|
<string name="action_display_show_tabs">Show category tabs</string>
|
||||||
<string name="action_display_show_number_of_items">Show number of items</string>
|
<string name="action_display_show_number_of_items">Show number of items</string>
|
||||||
<string name="action_disable">Disable</string>
|
<string name="action_disable">Disable</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user