Android: Fix long press action for leanback game cards
This commit is contained in:
parent
cf0706c239
commit
ce66d5875f
|
@ -54,11 +54,12 @@ class GameRowPresenter(private val mActivity: FragmentActivity) : Presenter() {
|
||||||
// Set the background color of the card
|
// Set the background color of the card
|
||||||
val background = ContextCompat.getDrawable(context, R.drawable.tv_card_background)
|
val background = ContextCompat.getDrawable(context, R.drawable.tv_card_background)
|
||||||
cardParent.infoAreaBackground = background
|
cardParent.infoAreaBackground = background
|
||||||
cardParent.setOnClickListener { view: View ->
|
cardParent.setOnLongClickListener { view: View ->
|
||||||
val activity = view.context as FragmentActivity
|
val activity = view.context as FragmentActivity
|
||||||
val fragment = GamePropertiesDialog.newInstance(holder.gameFile)
|
val fragment = GamePropertiesDialog.newInstance(holder.gameFile)
|
||||||
activity.supportFragmentManager.beginTransaction()
|
activity.supportFragmentManager.beginTransaction()
|
||||||
.add(fragment, GamePropertiesDialog.TAG).commit()
|
.add(fragment, GamePropertiesDialog.TAG).commit()
|
||||||
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GameFileCacheManager.findSecondDisc(gameFile) != null) {
|
if (GameFileCacheManager.findSecondDisc(gameFile) != null) {
|
||||||
|
|
Loading…
Reference in New Issue