SwipeRefreshLayout with scrollView and Layout above

后端 未结 4 501
攒了一身酷
攒了一身酷 2020-12-28 13:39

I have the following layout



        
4条回答
  •  礼貌的吻别
    2020-12-28 14:13

    Make your own implementation of SwipeRefreshLayout and override the canChildScrollUp in this way:

        @Override
    public boolean canChildScrollUp() {
        if (scrollView != null)
            return scrollView.canScrollVertically(-1);
    
        return false;
    }
    

    just replace with any subclass of ScrollView.

提交回复
热议问题