android - Error: Cardview Rounded corners -
this question has answer here:
when added following line current project using cardview got error follow.
 card_view:cardcornerradius="8dp"  error:
error:(2) error parsing xml: unbound prefix. not allow background xml file too. my xml:
 <?xml version="1.0" encoding="utf-8"?>         <android.support.v7.widget.cardview xmlns:android="http://schemas.android.com/apk/res/android"             android:id="@+id/card_view"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_margin="15dp"             card_view:cardusecompatpadding="true"             android:elevation="100dp">              <relativelayout                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:background="@drawable/recycleview">                  <imageview                     android:id="@+id/thumbnail"                     android:layout_width="match_parent"                     android:layout_height="250dp"                     android:layout_alignparenttop="true"                     android:background="@drawable/recycleview"                     android:scaletype="centercrop"                     android:src="@drawable/fbim" />                  <relativelayout                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_below="@+id/thumbnail"                     android:background="#15579d">                  </relativelayout>             </relativelayout>         </android.support.v7.widget.cardview> 
add in xml layout file
 xmlns:app="http://schemas.android.com/apk/res-auto" like this
<android.support.v7.widget.cardview            xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:app="http://schemas.android.com/apk/res-auto"         xmlns:tools="http://schemas.android.com/tools"         android:id="@+id/card_view"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_margin="15dp"         app:cardelevation="3dp"         app:cardusecompatpadding="true"         app:cardcornerradius="10dp"> 
Comments
Post a Comment