Folks,Impossibile rimuovere spazio tra gli elementi a schede - Scorrevole RecyclerView
Sono fuori di opzioni durante il tentativo di rimozione di spazio tra gli elementi a schede nella mia recyclerview sotto è l'uscita di corrente. Si prega di suggerire.
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#303030"
android:id="@+id/cv"
android:layout_marginTop="2dip"
android:layout_marginBottom="2dip"
card_view:cardUseCompatPadding="true"
card_view:cardElevation="5dp"
android:foreground="?android:attr/selectableItemBackground"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:padding="5dp"
android:longClickable="true"
android:background="#303030">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/person_photo"
android:background="@drawable/vector_red"
android:layout_alignBottom="@+id/txtSub" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/txtMain"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/person_photo"
android:layout_toEndOf="@+id/person_photo"
android:elevation="4dp"
android:textSize="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Small Text"
android:id="@+id/txtSub"
android:layout_below="@+id/txtMain"
android:layout_toRightOf="@+id/person_photo"
android:layout_toEndOf="@+id/person_photo" />
</RelativeLayout>
</android.support.v7.widget.CardView>
mio punto di vista Recycler
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HomeFragment">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
card_view:cardUseCompatPadding="false"
card_view:cardPreventCornerOverlap="false"
android:background="#0fffffff" />
</RelativeLayout>
Dupe di http://stackoverflow.com/questions/34240078/modify-cardview-padding? Anche questo non ha una risposta, sfortunatamente. – alzee
Giusto ma il padding è comparativamente ok, ottengo un cardview dall'aspetto brutto ,. serve una vista compatta almeno. – xtechkid
puoi pubblicare uno screenshot di quello che vuoi? @xtechkid – kId