0
Я хочу добавить текст после изображения в виде карты. Это XML макет я написал:Как добавить текст ниже изображения в CardView
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<ImageView
android:id="@+id/image_main"
android:layout_gravity="top"
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/main_img"
android:scaleType="centerCrop"
/>
<TextView
android:id="@+id/info_text"
android:text="Hello World"
android:textAlignment="center"
android:textColor="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</android.support.v7.widget.CardView>
Здесь текст не отображается под изображением. Отображаются только изображение и пробел. Как исправить это?