mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-16 16:36:29 +08:00
fix some keys invalid
This commit is contained in:
@@ -192,6 +192,12 @@ class MainFragment : Fragment(), CardAdapter.ItemListener {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onKey(keyCode: Int) {
|
||||
if (this.isHidden) {
|
||||
(activity as MainActivity).onKey(keyCode)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemFocusChange(tvViewModel: TVViewModel, hasFocus: Boolean) {
|
||||
if (hasFocus) {
|
||||
tvListViewModel.setItemPositionCurrent(tvViewModel.id.value!!)
|
||||
|
||||
Reference in New Issue
Block a user