AppBarLayout + TabLayout + CollapsingToolbarLayout + SwipeToRefresh

后端 未结 1 1182
[愿得一人]
[愿得一人] 2021-02-05 17:27

I met a lot of issues related with my problem but nobody I found wanted the behaviour I\'m looking for.

I want a view pager with tabs and app bar, when the contained fra

1条回答
  •  面向向阳花
    2021-02-05 17:44

    If you don't want parallax effect, you don't need to use CollapsingToolbarLayout.

    Most important configuration:

    In Toolbar, set app:layout_scrollFlags="scroll|enterAlways".

    In ViewPager, set app:layout_behavior="@string/appbar_scrolling_view_behavior".

    And layout should look like this:

    
    
        
    
            
    
            
    
        
    
        
    
        
    
    
    

    Move ProgressWheel out of your SwipeRefreshLayout to fix your problem that SwipeRefreshLayout can't refresh.

    0 讨论(0)
提交回复
热议问题