Skip to content

Commit

Permalink
Android: Fix long press action for leanback game cards
Browse files Browse the repository at this point in the history
  • Loading branch information
t895 committed Mar 21, 2023
1 parent cf0706c commit ce66d58
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ class GameRowPresenter(private val mActivity: FragmentActivity) : Presenter() {
// Set the background color of the card
val background = ContextCompat.getDrawable(context, R.drawable.tv_card_background)
cardParent.infoAreaBackground = background
cardParent.setOnClickListener { view: View ->
cardParent.setOnLongClickListener { view: View ->
val activity = view.context as FragmentActivity
val fragment = GamePropertiesDialog.newInstance(holder.gameFile)
activity.supportFragmentManager.beginTransaction()
.add(fragment, GamePropertiesDialog.TAG).commit()
true
}

if (GameFileCacheManager.findSecondDisc(gameFile) != null) {
Expand Down

0 comments on commit ce66d58

Please sign in to comment.