show info

This commit is contained in:
Li ZongYing
2023-12-27 23:53:03 +08:00
parent e6530b4e9e
commit 72e893b73a
10 changed files with 103 additions and 45 deletions
@@ -55,25 +55,9 @@ class MainActivity : FragmentActivity() {
gestureDetector = GestureDetector(this, GestureListener())
}
fun switchInfoFragment(tv: TV) {
infoFragment.setInfo(tv)
if (infoFragment.isHidden) {
supportFragmentManager.beginTransaction().show(infoFragment).commit()
}
}
fun showInfoFragment(tv: TV) {
infoFragment.setInfo(tv)
supportFragmentManager.beginTransaction()
.show(infoFragment)
.commit()
}
fun hideInfoFragment() {
supportFragmentManager.beginTransaction()
.hide(infoFragment)
.commit()
fun showInfoFragment(tvViewModel: TVViewModel) {
infoFragment.setInfo(tvViewModel)
infoFragment.show()
}
fun play(tvViewModel: TVViewModel) {