У меня есть список из 31 элемента, каждый из которых имеет 4 textViews. Я оборачиваю все текстовые представления в линейный макет. Я показал 1 в коде. Так же, как и этот, у меня есть еще 30:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="loren"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="10"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="5"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="25"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="9"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
</LinearLayout>
и результирующий код, для ясности которого показан только один.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_globe"
android:background="@color/dashBackground">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="loren"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="10"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="5"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="25"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:text="9"
android:textColor="#000"
android:gravity="center"
android:textSize="20dp"
android:layout_weight="2"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Я не могу прокрутить все элементы или все линейные макеты. Я могу прокрутить до некоторой точки, но затем она перестает прокручиваться вниз. Я новичок в android, пожалуйста, помогите мне.