Android 在滚动条中添加xml格式的电影概览文本视图
我有以下xml。基本上,我想在id等于layoutOne的布局下面显示电影概览Android 在滚动条中添加xml格式的电影概览文本视图,android,xml,scrollbar,views,Android,Xml,Scrollbar,Views,我有以下xml。基本上,我想在id等于layoutOne的布局下面显示电影概览 这是我得到的 我希望示例文本伟大的电影是下面的淡粉色布局。这里棘手的部分是滚动条视图只允许一个子视图。有什么想法吗 谢谢 Theo.相对性约束应该适合整个页面。如果要使用ScrollView,还应将RelativeLayout添加到ScrollView中 因此,情况是这样的: <LinearLayout android:id="@+id/layoutOne"
这是我得到的
我希望示例文本伟大的电影是下面的淡粉色布局。这里棘手的部分是滚动条视图只允许一个子视图。有什么想法吗
谢谢
Theo.相对性约束应该适合整个页面。如果要使用
ScrollView
,还应将RelativeLayout
添加到ScrollView
中
因此,情况是这样的:
<LinearLayout
android:id="@+id/layoutOne"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:padding="16dp"
android:background="@color/primary"
>
稍后,您可以使用以下方法调整图像:
<LinearLayout
android:layout_marginBottom="439dp"
android:layout_marginEnd="156dp"
android:layout_marginStart="156dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
>
<LinearLayout
android:layout_marginBottom="439dp"
android:layout_marginEnd="156dp"
android:layout_marginStart="156dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
>