How can I create a card view?

EMBED

Saved by @Awais malik #android #java

Step 0: Make sure that the repositories section includes Google’s Maven repository google()

allprojects {
    repositories {
      google()
      jcenter()
    }
  }
content_copyCOPY

Step 1: Now add dependency into your manifest file

implementation 'com.android.support:design:28.0.0'
content_copyCOPY

Step 2: Now recompile your project and if error occur then replace theme in style file with any of following

Theme.MaterialComponents
Theme.MaterialComponents.NoActionBar
Theme.MaterialComponents.Light
Theme.MaterialComponents.Light.NoActionBar
Theme.MaterialComponents.Light.DarkActionBar
content_copyCOPY

Step 3: Now you can use material card view

  <android.support.design.card.MaterialCardView
        android:id="@+id/cardview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >
        
    </android.support.design.card.MaterialCardView>
content_copyCOPY

In this tutorial i will teach you how to use material design cardView in your android application

,