i um meinen cardview Kräuselungeffekt und Grenze will, und ich habe zwei XML-Datei einen für Grenze und andere für riple Wirkung, so wie kann ich auf meinem cardview als Hintergrundwie zwei XML-Datei setzen zusammen als Hintergrund
hier ist mein Code
shape.xml (v17)
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp" android:color="#1B5E20" />
<corners android:radius="2dp"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>
ripple.xml (v21)
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item
android:id="@android:id/mask"
android:drawable="@android:color/white">
</item>
</ripple>
und hier ist mein cardview, dass ich beide zusammen, was einstellen wollen ..
cardview.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
android:layout_marginTop="10dp"
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:background="@drawable/shape"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<TextView
android:textColor="#000"
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:textSize="20sp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
, wie ich beide Datei festlegen können zusammen bcz zwei Hintergrund in auf das Layout nicht unterstützt wird. hilf mir, bitte.
überprüfen Sie diesen Link http://stackoverflow.com/questions/24527402/android-l-ripple-touch-effect-on-shape –