mirror of
https://github.com/PabloMK7/citra.git
synced 2025-01-18 18:03:06 +01:00
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.
This commit is contained in:
parent
52f06f757f
commit
e3b156bd96
2 changed files with 23 additions and 2 deletions
|
@ -153,9 +153,15 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
||||||
} else {
|
} else {
|
||||||
View.VISIBLE
|
View.VISIBLE
|
||||||
}
|
}
|
||||||
|
binding.textGameId.visibility = if (game.titleId == 0L) {
|
||||||
|
View.GONE
|
||||||
|
} else {
|
||||||
|
View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
binding.textGameTitle.text = game.title
|
binding.textGameTitle.text = game.title
|
||||||
binding.textCompany.text = game.company
|
binding.textCompany.text = game.company
|
||||||
|
binding.textGameId.text = String.format("ID: %016X", game.titleId)
|
||||||
binding.textFilename.text = game.filename
|
binding.textFilename.text = game.filename
|
||||||
|
|
||||||
val backgroundColorId =
|
val backgroundColorId =
|
||||||
|
@ -181,6 +187,9 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
||||||
binding.textCompany.ellipsize = TextUtils.TruncateAt.MARQUEE
|
binding.textCompany.ellipsize = TextUtils.TruncateAt.MARQUEE
|
||||||
binding.textCompany.isSelected = true
|
binding.textCompany.isSelected = true
|
||||||
|
|
||||||
|
binding.textGameId.ellipsize = TextUtils.TruncateAt.MARQUEE
|
||||||
|
binding.textGameId.isSelected = true
|
||||||
|
|
||||||
binding.textFilename.ellipsize = TextUtils.TruncateAt.MARQUEE
|
binding.textFilename.ellipsize = TextUtils.TruncateAt.MARQUEE
|
||||||
binding.textFilename.isSelected = true
|
binding.textFilename.isSelected = true
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_game_screen"
|
android:id="@+id/image_game_screen"
|
||||||
android:layout_width="56dp"
|
android:layout_width="75dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="75dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
@ -63,6 +63,18 @@
|
||||||
android:requiresFadingEdge="horizontal"
|
android:requiresFadingEdge="horizontal"
|
||||||
tools:text="Nintendo" />
|
tools:text="Nintendo" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_game_id"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
|
tools:text="0004000000033400" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_filename"
|
android:id="@+id/text_filename"
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
|
Loading…
Reference in a new issue