Android replace fragment still displays some of the replaced fragment

后端 未结 4 843
梦如初夏
梦如初夏 2020-12-03 17:50

I have a tab that contains a linear layout with a searchview and a listview. When the user clicks one of the search results, I want to replace that layout with another layou

4条回答
  •  醉梦人生
    2020-12-03 18:07

    To solve the problem, set the android:background property to “?android:windowBackground” in the fragment layout files.

        
    
        ...
    
    
    

    In Fragment_2

    
    
        ...
    
    
    

提交回复
热议问题