發現使用 NestedScrollView 嵌套使其佈局超出屏幕時滑動; 想讓最後一個子佈局位於屏幕最底方;
各種方法都不行,後來發現NestedScrollView 的 子佈局不能撐滿整個屏幕,而是包裹內容,按照wrap_content來計算,哪怕寫的 match_parent 也沒用;
解決辦法:
添加屬性:
android:fillViewport="true"
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
.....
</LinearLayout>
</android.support.v4.widget.NestedScrollView>