bigmanLau / CardviewFix

对安卓原生cardview增加一个修改阴影颜色的功能和阴影上下比例
Apache License 2.0
205 stars 28 forks source link

阴影效果和原生CardView有很大差距? #5

Closed cgcsyao closed 5 years ago

cgcsyao commented 5 years ago

demo代码:

<com.bigman.wmzx.customcardview.library.CardView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        app:cardPreventCornerOverlap="false"
        app:cardElevation="10dp">

    <View
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:background="#aaeeee"/>

</com.bigman.wmzx.customcardview.library.CardView>

<android.support.v7.widget.CardView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        app:cardElevation="10dp">

    <View
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:background="#aaeeee"/>

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

截图: http://lc-r04cu3re.cn-n1.lcfile.com/2dd8399cb977a56970c2/screenshot.png