0

My Cardview showing greyscreen. Can i know what the reason of these problem?

I have tried invalidate cache and restart but its not working

This is my cardView

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <android.support.v7.widget.CardView
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/card_view"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        card_view:cardCornerRadius="4dp">

        <TextView
            android:id="@+id/info_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </android.support.v7.widget.CardView>
</LinearLayout>

This is my preview enter image description here

1 Answers1

0

It is a careless mistakes actually i forgot to add implementation 'com.android.support:cardview-v7:28.0.0' in my gradle(app).