Android SwipeRefreshLayout with empty TextView not working properly

后端 未结 4 1595
旧巷少年郎
旧巷少年郎 2021-01-12 08:36

What i want to do is , allow user to swipe and refresh the list, it does not matter if the data is there or not. But when data is there in the listview only the listview sho

4条回答
  •  迷失自我
    2021-01-12 08:46

    I solved same problem by using FrameLayout, look at below code:

    
    
        
    
            
    
        
    
        
    
    

    You could use RelativeLayout as well, but the key is placing your ListView inside the SwipeRefreshLayout, and the TextView outside.

提交回复
热议问题