Skip to content

Commit

Permalink
fix the menu did not appear
Browse files Browse the repository at this point in the history
  • Loading branch information
lizongying committed Jan 14, 2024
1 parent 1ac6d87 commit a23b1e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/src/main/java/com/lizongying/mytv/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ class MainActivity : FragmentActivity() {
return true
}

KeyEvent.KEYCODE_ENTER -> {
switchMainFragment()
}

KeyEvent.KEYCODE_DPAD_CENTER -> {
Log.i(TAG, "KEYCODE_DPAD_CENTER")
switchMainFragment()
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/lizongying/mytv/MainFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ class MainFragment : BrowseSupportFragment() {
itemPosition = sharedPref?.getInt("position", 0)!!
if (itemPosition >= tvListViewModel.size()) {
itemPosition = 0
tvListViewModel.setItemPosition(itemPosition)
}
tvListViewModel.setItemPosition(itemPosition)
}

fun fragmentReady() {
Expand Down

0 comments on commit a23b1e1

Please sign in to comment.