Trong android, làm cách nào bạn có thể tạo chế độ xem cuộn có chiều cao tối đa và nội dung bọc, về cơ bản nó bao bọc nội dung theo chiều dọc, nhưng có chiều cao tối đa?Làm thế nào để thiết lập chiều cao tối đa với nội dung bọc trong android?
tôi đã cố gắng
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="200dp"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/maincontainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
Nhưng điều này không hoạt động?
đây là một giải pháp khác cho vấn đề: https://stackoverflow.com/questions/42694355/how-to-set-recyclerview-max-height/48970129#48970129 – user1506104