Orientation change Crash Application

后端 未结 5 1258
慢半拍i
慢半拍i 2020-12-19 10:42

I am using fragments and when i change the orientation the application crash. Here is the log cat:

05-29 05:56:52.158: E/AndroidRuntime(1428): java.lang.Runt         


        
5条回答
  •  梦毁少年i
    2020-12-19 10:50

    There is another case I found If you use different XML for Portrait and Landscape. Then different root element or view may lead to crash for example --

    My Portrait XML is --

        
    
    
        
    
            
    
    
                
    
                
    
                
    
    
                
    
                
    
                
    
                
    
                
    
                    

    My Landscape xml is --

     
    
    
    
        
    
            
    
    
                
    
                
    
                
    
    
                
    
                
    
                
    
                
    
                
    
                    

    Might be helpful to someone.

提交回复
热议问题