本文研究了ScrollView的measure过程,重点讨论ScrollView的子View配置了android:height=“match_parent”,却没有到达预想值(预想应该跟父容器一样高度),针对该问题进行探讨。
1 xml配置
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation=