From b8bb2e647c73a7b004c65685a35cf81a5c84355d Mon Sep 17 00:00:00 2001 From: kongfl888 Date: Thu, 15 Aug 2024 16:33:11 +0800 Subject: [PATCH] Android: restore the company name on the game card. --- .../org/citra/citra_emu/adapters/GameAdapter.kt | 9 +++++++++ .../app/src/main/res/layout/card_game.xml | 16 ++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/adapters/GameAdapter.kt b/src/android/app/src/main/java/org/citra/citra_emu/adapters/GameAdapter.kt index 0b178cbd6..fb57c241d 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/adapters/GameAdapter.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/adapters/GameAdapter.kt @@ -148,6 +148,11 @@ class GameAdapter(private val activity: AppCompatActivity) : } else { View.VISIBLE } + binding.textCompany.visibility = if (game.company.isEmpty()) { + View.GONE + } else { + View.VISIBLE + } binding.textGameId.visibility = if (game.titleId == 0L) { View.GONE } else { @@ -155,6 +160,7 @@ class GameAdapter(private val activity: AppCompatActivity) : } binding.textGameTitle.text = game.title + binding.textCompany.text = game.company binding.textGameId.text = String.format("ID: %016X", game.titleId) binding.textFilename.text = game.filename @@ -178,6 +184,9 @@ class GameAdapter(private val activity: AppCompatActivity) : binding.textGameTitle.ellipsize = TextUtils.TruncateAt.MARQUEE binding.textGameTitle.isSelected = true + binding.textCompany.ellipsize = TextUtils.TruncateAt.MARQUEE + binding.textCompany.isSelected = true + binding.textGameId.ellipsize = TextUtils.TruncateAt.MARQUEE binding.textGameId.isSelected = true diff --git a/src/android/app/src/main/res/layout/card_game.xml b/src/android/app/src/main/res/layout/card_game.xml index 88c77fd30..16f0a8d9a 100644 --- a/src/android/app/src/main/res/layout/card_game.xml +++ b/src/android/app/src/main/res/layout/card_game.xml @@ -22,8 +22,8 @@ @@ -51,6 +51,18 @@ android:requiresFadingEdge="horizontal" tools:text="The Legend of Zelda\nOcarina of Time 3D" /> + +