CollapsingToolbarLayout doesn't recognize scroll fling

后端 未结 6 968
野趣味
野趣味 2020-12-02 07:08

I have created a simple CollapsingToolbarLayout and it works like a charm. My problem is, that if I try to use a fling scroll on the nestedscrollvie

6条回答
  •  一整个雨季
    2020-12-02 07:38

    Am just posting this here so that others do not miss it in Comments. The answer by Jinang works beautifully, but kudos to AntPachon for pointing out a far simpler method for the same. Instead of implementing an OnClick method on the Child of the NestedScrollView programatically, a better way is to set clickable=true in the xml for the child.

    (Using the same example as Jinang's)

    
    
                        
    
        
    
      
    
    
    

提交回复
热议问题