'Text not appearing in a linear layout?

I have created a game which has the function to build castles, the castles are put in a list that you access with a button and are shown with a linear layout.

The code you see down below is the code for the linear layout and when i run the app, press the button to open this layout it doesn't show me the text and I have no error.

Below the code there is the image of the list of castle with one castle, and as you can see the text doesn't appear.

Can someone please explain me what the problem may be?

    <?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <ImageView
            android:layout_width="150dp"
            android:layout_height="150dp"
            android:id="@+id/CastleImage"/>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:background="#730707">
            <TextView
                android:layout_width="150dp"
                android:layout_height="150dp"
                android:id="@+id/NameofCastle"
                android:text="Name"
                android:textColor="@color/white"
                android:textSize="20dp"/>
        </LinearLayout>
    </LinearLayout>

</androidx.cardview.widget.CardView>

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source