android - Cardview - white border around card -


i using cardview root of custom view writing. using v7 support library. xml looks this:

<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.cardview         xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:card_view="http://schemas.android.com/apk/res-auto"         android:layout_width="wrap_content"         android:layout_height="match_parent"         android:layout_marginright="6dp"         card_view:cardelevation="0dp">      <linearlayout             android:layout_width="match_parent"             android:layout_height="match_parent"             android:orientation="vertical">          <!-- other views -->     </linearlayout> </android.support.v7.widget.cardview> 

my problem getting white border around card view. looks there indicate elevation thicker on right side. i've tried adjusting cardelevation , maxcardelevation in xml : card_view:cardelevation="0dp"

and in code in custom view extends cardview , uses layout:

setcardelevation(0); setmaxcardelevation(0); 

but white border persists. i'm not sure how rid of it. if had input why happening or suggestions on how can remove white border appreciated. much.

i know it's bit late, having similar problem:

i had same issue: white border shown on pre-lollipop devices.

i solved setting cardpreventcorneroverlap false on xml.

like this:

<android.support.v7.widget.cardview     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:card_view="http://schemas.android.com/apk/res-auto"     android:layout_width="wrap_content"     android:layout_height="match_parent"     android:layout_marginright="6dp"     card_view:cardpreventcorneroverlap="false">      <linearlayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">          <!-- other views -->     </linearlayout> </android.support.v7.widget.cardview> 

hope helps!


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -