Seamless nested scrolling (Android)

前端 未结 8 1416
不知归路
不知归路 2020-12-15 01:46

We\'ve all been advised against nesting views that contain a scrolling mechanism. However, in the latest Android release (5.0), the Phone app caught my attention with what s

8条回答
  •  囚心锁ツ
    2020-12-15 02:21

    You can use the following combination of attributes on your ListView to achieve this:

     
    
    
        android:clipToPadding="false"
        ...
    />
    

    You don't have to manage any scrolling in your code at all, and it requires no header/dummy views in your list adapter.

提交回复
热议问题