File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed 
app/src/main/java/com/lizongying/mytv Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -236,8 +236,11 @@ class MainActivity : FragmentActivity() {
236236                return  true 
237237            }
238238
239+             KeyEvent .KEYCODE_ENTER  ->  {
240+                 switchMainFragment()
241+             }
242+ 
239243            KeyEvent .KEYCODE_DPAD_CENTER  ->  {
240-                 Log .i(TAG , " KEYCODE_DPAD_CENTER" 
241244                switchMainFragment()
242245            }
243246
Original file line number Diff line number Diff line change @@ -209,8 +209,8 @@ class MainFragment : BrowseSupportFragment() {
209209        itemPosition =  sharedPref?.getInt(" position" 0 )!! 
210210        if  (itemPosition >=  tvListViewModel.size()) {
211211            itemPosition =  0 
212-             tvListViewModel.setItemPosition(itemPosition)
213212        }
213+         tvListViewModel.setItemPosition(itemPosition)
214214    }
215215
216216    fun  fragmentReady () {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments