2016-07-27 6 views
1

Ich habe diesen Fehler, wenn ich ClipTochild verwenden & ClipToPadding meine Elternansicht ist Clipping Wie kann ich dieses Problem lösen, wie dieses Problem zu lösen, wenn ich Recyclerview verwende.Wenn Scrolling Recyclerview Clip Elternansicht, Wie kann ich das Problem lösen

Das ist mein style.xml

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/colorAccent</item> 
     <item name="windowActionBar">false</item> 
     <item name="windowNoTitle">true</item> 
     <item name="android:typeface">serif</item> 
     <item name="android:windowNoTitle">true</item> 
     <item name="android:windowAllowEnterTransitionOverlap">true</item> 
     <item name="android:windowAllowReturnTransitionOverlap">true</item> 
     <item name="android:windowContentTransitions">true</item> 
     <item name="android:windowTranslucentNavigation">true</item> 
     <item name="android:fitsSystemWindows">true</item> 
     <item name="android:clipChildren">false</item> 
     <item name="android:clipToPadding">false</item> 
    </style> 

Das ist mein layout.xml

<LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_margin="10dp" 
      android:background="@drawable/fare_bg" 
      > 


     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_margin="10dp" 
      android:background="@drawable/fare_bg" 
      > 

      <LinearLayout 
       android:id="@+id/address_bar_lin" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 

       android:orientation="horizontal" 
       android:padding="5dp"> 

       <ImageView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:padding="8dp" 
        app:srcCompat="@drawable/ub__fare_split_search_icon" /> 

       <LinearLayout 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:layout_weight="1" 
        android:orientation="vertical" 
        android:padding="2dp"> 

        <EditText 
         android:id="@+id/placesEdittxt" 
         android:layout_width="match_parent" 
         android:layout_height="match_parent" 
         android:background="@android:color/transparent" 
         android:singleLine="true" 
         android:textColor="@color/textAddressColor" 
         android:textSize="12sp" 
         android:typeface="monospace" /> 
       </LinearLayout> 

       <ImageView 
        android:id="@+id/img_clear" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:padding="8dp" 
        android:visibility="gone" 
        app:srcCompat="@drawable/ub__x_normal" /> 
      </LinearLayout> 
     </LinearLayout> 


    <RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" > 

     <android.support.v7.widget.RecyclerView 
      android:id="@+id/recyclerview" 
      android:layout_width="match_parent" 
      android:fitsSystemWindows="false" 
      android:layout_height="match_parent" 
      android:layout_margin="10dp" 
      android:layout_weight="1" 
      android:background="@drawable/fare_bg" > 


     </android.support.v7.widget.RecyclerView> 

    </RelativeLayout> 

</LinearLayout> 

enter image description here

+0

versuchen, einige Polsterung unterhalb der Recycler-Ansicht – AbhayBohra

+0

R U überprüft Bildschirmaufnahme. – Lovekesh

+0

'" kann ich das Problem lösen, wie dieses Problem gelöst wird "' Welches Problem? welches Problem? – pskink

Antwort

0

entfernen Gewicht von recyclerview da die übergeordneten Relative-Layout ist und Versuchen Sie Folgendes:

<android.support.v7.widget.RecyclerView 
     android:id="@+id/recyclerview" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_margin="10dp" 
     android:paddingBottom="20dp" 
     android:fitsSystemWindows="false"> 


    </android.support.v7.widget.RecyclerView>