Android: why are CardView margins not showing white background? -


i have set cardview in recyclerview list. layout_margintop , layout_marginbottom showing grey color rather white background had hoped see (image below). ideas on how top , bottom margins show white background?

enter image description here

<android.support.v7.widget.cardview     xmlns:card_view="http://schemas.android.com/apk/res-auto"     xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/card_view"     android:layout_width="match_parent"     android:layout_height="match_parent"     card_view:cardcornerradius="6dp"     android:layout_margin="4dp">      <textview         android:id="@+id/cardtext"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_margintop="20dp"         android:layout_marginbottom="20dp"         android:background="@android:color/white"  />  </android.support.v7.widget.cardview> 

removed textview background , added background cardview: "card_view:cardbackgroundcolor="some color""


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -