Reputation: 891
I am using a MaterialCardView to display the following expected layout.
IOS screen shot, expected UI
But on Android side it looks like this. Android screenshot, shadow does not appear on all sides, mainly on the top
This is my code for this.
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:strokeWidth="@dimen/cds_dimen_1dp"
app:strokeColor="#D9D9D9"
android:layout_margin="@dimen/cds_dimen_4dp"
app:cardCornerRadius="@dimen/cds_dimen_8dp"
app:cardElevation="@dimen/cds_dimen_6dp">
[...]
</com.google.android.material.card.MaterialCardView>
What is that I need to do to achieve this?
this is an item_layout_row for a recyclerview
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview_reason"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
app:layout_constraintTop_toBottomOf="@id/textView"
android:layout_marginTop="@dimen/cds_dimen_20dp"
android:paddingBottom="@dimen/cds_dimen_20dp"/>
Upvotes: 0
Views: 273