diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-03-11 06:39:53 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:41 +0200 |
commit | 7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193 (patch) | |
tree | dcdad5874e46154e1dc365a6a1cddaaca2f0613b /src/android/app | |
parent | android: Remove ThemeUtil (diff) | |
download | yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar.gz yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar.bz2 yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar.lz yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar.xz yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.tar.zst yuzu-7a0d7bb3f309dd8f3f6cdb2fd9b9924275213193.zip |
Diffstat (limited to 'src/android/app')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.java | 44 | ||||
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.kt | 32 |
2 files changed, 32 insertions, 44 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.java deleted file mode 100644 index 41b8c6a27..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.yuzu.yuzu_emu.viewholders; - -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.recyclerview.widget.RecyclerView; - -import org.yuzu.yuzu_emu.R; - -/** - * A simple class that stores references to views so that the GameAdapter doesn't need to - * keep calling findViewById(), which is expensive. - */ -public class GameViewHolder extends RecyclerView.ViewHolder { - private View itemView; - public ImageView imageIcon; - public TextView textGameTitle; - public TextView textGameCaption; - - public String gameId; - - // TODO Not need any of this stuff. Currently only the properties dialog needs it. - public String path; - public String title; - public String description; - public String regions; - public String company; - - public GameViewHolder(View itemView) { - super(itemView); - - this.itemView = itemView; - itemView.setTag(this); - - imageIcon = itemView.findViewById(R.id.image_game_screen); - textGameTitle = itemView.findViewById(R.id.text_game_title); - textGameCaption = itemView.findViewById(R.id.text_game_caption); - } - - public View getItemView() { - return itemView; - } -} diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.kt new file mode 100644 index 000000000..e7319107e --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/viewholders/GameViewHolder.kt @@ -0,0 +1,32 @@ +package org.yuzu.yuzu_emu.viewholders + +import android.view.View +import android.widget.ImageView +import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView +import org.yuzu.yuzu_emu.R + +/** + * A simple class that stores references to views so that the GameAdapter doesn't need to + * keep calling findViewById(), which is expensive. + */ +class GameViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { + var imageIcon: ImageView + var textGameTitle: TextView + var textGameCaption: TextView + var gameId: String? = null + + // TODO Not need any of this stuff. Currently only the properties dialog needs it. + var path: String? = null + var title: String? = null + var description: String? = null + var regions: String? = null + var company: String? = null + + init { + itemView.tag = this + imageIcon = itemView.findViewById(R.id.image_game_screen) + textGameTitle = itemView.findViewById(R.id.text_game_title) + textGameCaption = itemView.findViewById(R.id.text_game_caption) + } +} |