AKTUALISIERTE FRAGE: Ich versuche zu scrollen, aber nicht zu blättern. Überprüfen Sie das Bild:Scrollview scrollt nicht im Fragment
OLD:
Ich habe 5 mehr cardviews in meinem Linearlayout, aber ich klebte nur 1. Ich weiß nicht, was Probleme mit der Scroll verursacht. Ich habe bereits versucht, das erste lineare Layout zu entfernen, aber nicht funktioniert.
XML:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_nearby_newest"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:background="#fafafa"
android:fitsSystemWindows="true"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:id="@+id/scrollView"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp"
android:layout_margin="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum vulputate finibus. Morbi venenatis blandit purus, sit amet ultricies elit laoreet imperdiet. Morbi suscipit diam non consequat faucibus. Aliquam erat volutpat. Mauris luctus, eros nec mollis dapibus, lorem nunc pharetra arcu, ut rhoncus erat erat sed mi. Morbi condimentum lacinia augue, nec malesuada ligula posuere suscipit. Sed vehicula ex cursus, tempor libero eu, finibus metus."
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp"
android:layout_margin="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum vulputate finibus. Morbi venenatis blandit purus, sit amet ultricies elit laoreet imperdiet. Morbi suscipit diam non consequat faucibus. Aliquam erat volutpat. Mauris luctus, eros nec mollis dapibus, lorem nunc pharetra arcu, ut rhoncus erat erat sed mi. Morbi condimentum lacinia augue, nec malesuada ligula posuere suscipit. Sed vehicula ex cursus, tempor libero eu, finibus metus."
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp"
android:layout_margin="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum vulputate finibus. Morbi venenatis blandit purus, sit amet ultricies elit laoreet imperdiet. Morbi suscipit diam non consequat faucibus. Aliquam erat volutpat. Mauris luctus, eros nec mollis dapibus, lorem nunc pharetra arcu, ut rhoncus erat erat sed mi. Morbi condimentum lacinia augue, nec malesuada ligula posuere suscipit. Sed vehicula ex cursus, tempor libero eu, finibus metus."
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp"
android:layout_margin="5dp"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum vulputate finibus. Morbi venenatis blandit purus, sit amet ultricies elit laoreet imperdiet. Morbi suscipit diam non consequat faucibus. Aliquam erat volutpat. Mauris luctus, eros nec mollis dapibus, lorem nunc pharetra arcu, ut rhoncus erat erat sed mi. Morbi condimentum lacinia augue, nec malesuada ligula posuere suscipit. Sed vehicula ex cursus, tempor libero eu, finibus metus."
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
<TextView
android:layout_width="wrap_content"
android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum vulputate finibus. Morbi venenatis blandit purus, sit amet ultricies elit laoreet imperdiet. Morbi suscipit diam non consequat faucibus. Aliquam erat volutpat. Mauris luctus, eros nec mollis dapibus, lorem nunc pharetra arcu, ut rhoncus erat erat sed mi. Morbi condimentum lacinia augue, nec malesuada ligula posuere suscipit. Sed vehicula ex cursus, tempor libero eu, finibus metus."
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</FrameLayout>
Paste Code als tatsächliche Code, einen Blick zu verstehen, nicht als Screenshots – 0xDEADC0DE
Screenshots verscheuchen Entwickler. –
Ich habe meine Antwort bearbeitet –