From e3b156bd968ac6163bbf38292ac84bc98794c509 Mon Sep 17 00:00:00 2001 From: kongfl888 K Date: Tue, 20 Aug 2024 16:20:52 +0800 Subject: [PATCH] Android: add the titleId to the game card. (#227) * Android: replace company in the game card with titleId. TitleId is more useful for users than companies because it can help them find game saves and the cheat file. * 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 cc0a2b750..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 @@ -153,9 +153,15 @@ class GameAdapter(private val activity: AppCompatActivity) : } else { View.VISIBLE } + binding.textGameId.visibility = if (game.titleId == 0L) { + View.GONE + } else { + View.VISIBLE + } binding.textGameTitle.text = game.title binding.textCompany.text = game.company + binding.textGameId.text = String.format("ID: %016X", game.titleId) binding.textFilename.text = game.filename val backgroundColorId = @@ -181,6 +187,9 @@ class GameAdapter(private val activity: AppCompatActivity) : binding.textCompany.ellipsize = TextUtils.TruncateAt.MARQUEE binding.textCompany.isSelected = true + binding.textGameId.ellipsize = TextUtils.TruncateAt.MARQUEE + binding.textGameId.isSelected = true + binding.textFilename.ellipsize = TextUtils.TruncateAt.MARQUEE binding.textFilename.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 6b20567cf..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 @@ @@ -63,6 +63,18 @@ android:requiresFadingEdge="horizontal" tools:text="Nintendo" /> + +