Ramz Ramz - 1 month ago 16
Android Question

cardCornerRadius shows error

I am learning android material design but in between it keeps giving an error. Can anyone help me on this?


workspace/RecyclerCardView/res/layout/list_item_row.xml:2: error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.Zybo.recyclercardview'


<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="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
card_view:cardCornerRadius="5dp" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<ImageView
android:id="@+id/img_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="7dp" />

<TextView
android:id="@+id/txt_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hellooo..." />
</LinearLayout>

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

Answer

Thanks all for trying to solve the question. At last i got the answer for my Question

1.Import the card view and recycle view separately from sdk/extras/v7/cardview
2.sdk/extras/v7/recycleview
3.right click on the imported projects go to properties and check the library box.
4.Now go the main project where you are working and add these two libraries by right clicking on the project go to properties-->android(left side)-->click add(library) (right bottom side) and the required libraries.