【发布时间】:2022-11-23 11:23:23
【问题描述】:
我的ScrollView里面有一个LinearLayoutCompat:
<ScrollView
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@id/overview_holder"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/seats_viewHolder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
LinearLayoutCompat 完全适合 ScrollView;问题是,当我尝试以编程方式放大 LinearLayoutCompat 时,ScrollView 仍然没有开始滚动。我如何更新 ScrollView 以便它滚动并显示屏幕外的子视图部分?
【问题讨论】:
-
嗨 Roozbeh,你能提供一些关于如何以编程方式扩展 LinearLayoutCompat 的线索或代码吗?
标签: android android-layout android-view