I would prefer a text to appear in front of my image, but instead I cant see the text
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="100dp"
android:layout_height="50dp"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:gravity="center"
app:cardCornerRadius="10dp"
android:padding="8dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/category_image_row"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="10dp"
android:background="@color/black"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/txt_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/cera_pro_bold"
android:gravity="center"
android:textColor="@color/white"
android:textSize="18sp"
tools:text="Shop" />
</FrameLayout>
</androidx.cardview.widget.CardView>
Output
As we see here, I dont see the text above the image and I dont know why