0

Ich habe ein Scrollview-Element mit einem CardView drin, und ein Bündel Elemente innerhalb des LinearLayout.ScrollView scrollt nicht bis zum Ende in CardView

Dies ist mein Code:

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 
    <android.support.v4.widget.NestedScrollView 
     android:layout_width="wrap_content" 
     android:layout_height="match_parent" 
     android:padding="10dp"> 
    <android.support.v7.widget.CardView 
     android:id="@+id/detailView" 
     android:orientation="vertical" 
     android:background="@color/white" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_margin="10dp" 
     app:cardCornerRadius="7dp" 
     app:cardElevation="4dp"> 
     <LinearLayout 
      android:id="@+id/ll01" 
      android:layout_width="match_parent" 
      android:layout_height="50dp" 
      android:orientation="vertical" 
      android:layout_gravity="top" 
      android:gravity="center|left" 
      android:paddingLeft="20dp"> 
      <TextView 
       android:id="@+id/titleTxt" 
       android:layout_width="wrap_content" 
       android:textColor="@color/colorPrimaryDark" 
       android:textSize="35dp" 
       android:textStyle="bold" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:layout_marginTop="10dp"/> 
     </LinearLayout> 
     <LinearLayout 
      android:id="@+id/ll02" 
      android:layout_below="@id/ll01" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:orientation="vertical" 
      android:layout_gravity="top" 
      android:layout_marginTop="50dp" 
      android:layout_marginBottom="225dp" 
      android:gravity="center" 
      android:paddingLeft="20dp"> 
     <ImageView 
      android:id="@+id/imgView" 
      android:scaleType="centerCrop" 
      android:layout_width="wrap_content" 
      android:layout_height="match_parent" 
      android:gravity="center"/> 
     </LinearLayout> 
     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="275dp" 
      android:orientation="vertical" 
      android:layout_gravity="bottom" 
      android:gravity="center|left" 
      android:paddingLeft="20dp"> 
      <TextView 
       android:id="@+id/detailsTxt" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textColor="@color/colorPrimaryDark" 
       android:textSize="21dp" 
       android:textStyle="normal"/> 
     </LinearLayout> 
    </android.support.v7.widget.CardView> 
    </android.support.v4.widget.NestedScrollView> 
</FrameLayout> 

Aus irgendeinem Grund scheint es nicht in der Lage den ganzen Weg nach unten zu scrollen, die einen Teil des Textes schneidet.

Screenshot:

enter image description here

Jede Hilfe sehr geschätzt wird.

Antwort

1

Entfernen Sie einfach android:padding="10dp" aus NestedScrollView und füge Attribut android:layout_margin="10dp"

+0

Bereits versuchte es, noch gleiches Ergebnis. – Kabil

Verwandte Themen