CollapsingToolbarLayout中Toolbar不跟隨ListView擴展

要想Toolbar跟隨Listview的滑動擴展或者是收縮這中聯動效果,需要在ListView中配置如下屬性: android:nestedScrollingEnabled=”true”

            <ListView
                android:id="@+id/station_show"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:nestedScrollingEnabled="true"
                android:scrollbars="none" />

GridView同理,不過這個屬性sdk>21纔會有效,產生效果

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章