mirror of
https://github.com/lizongying/my-tv.git
synced 2026-10-31 08:36:29 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a23b1e11ce | ||
|
|
1ac6d87c3c |
@@ -64,7 +64,6 @@ class MainActivity : FragmentActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun play(tvViewModel: TVViewModel) {
|
fun play(tvViewModel: TVViewModel) {
|
||||||
Log.i(TAG, "play: ${tvViewModel.getTV()}")
|
|
||||||
playerFragment.play(tvViewModel)
|
playerFragment.play(tvViewModel)
|
||||||
mainFragment.view?.requestFocus()
|
mainFragment.view?.requestFocus()
|
||||||
}
|
}
|
||||||
@@ -237,8 +236,11 @@ class MainActivity : FragmentActivity() {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeyEvent.KEYCODE_ENTER -> {
|
||||||
|
switchMainFragment()
|
||||||
|
}
|
||||||
|
|
||||||
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||||
Log.i(TAG, "KEYCODE_DPAD_CENTER")
|
|
||||||
switchMainFragment()
|
switchMainFragment()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,8 @@ class MainFragment : BrowseSupportFragment() {
|
|||||||
itemPosition = sharedPref?.getInt("position", 0)!!
|
itemPosition = sharedPref?.getInt("position", 0)!!
|
||||||
if (itemPosition >= tvListViewModel.size()) {
|
if (itemPosition >= tvListViewModel.size()) {
|
||||||
itemPosition = 0
|
itemPosition = 0
|
||||||
tvListViewModel.setItemPosition(itemPosition)
|
|
||||||
}
|
}
|
||||||
|
tvListViewModel.setItemPosition(itemPosition)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun fragmentReady() {
|
fun fragmentReady() {
|
||||||
|
|||||||
Reference in New Issue
Block a user