I'm developing an Android app in Java & Android Studio.
I want to create in activity a CardView programmatically.
I want to set the following properties to the CardView:
layout_width="wrap_content"
layout_row="0"
layout_column="1"
layout_gravity="fill"
layout_margin="8dp"
layout_columnWeight="1"
layout_rowWeight="1"
cardCornerRadius="8dp"
cardElevation="8dp"
The card should be created in a GridLayout
CardView cardView = new CardView(getActivity());