Последний CardView не отображается должным образом в DrawerLayout

Я пытаюсь отобразить cardViews на drawerLayout примерно так: CardView

Но последний CardView не отображается должным образом. Мой код cardView.xml выглядит так:

<?xml version="1.0" encoding="utf-8"?>
 <android.support.v7.widget.CardView   
  xmlns:android="http://schemas.android.com/apk/res/android"                                                       
  xmlns:card_view="http://schemas.android.com/apk/res-auto"
  android:orientation="horizontal"
  android:layout_width="match_parent"
  android:layout_margin="10dp"
  card_view:cardCornerRadius="4dp"
  card_view:cardElevation="10dp"
  android:layout_height="wrap_content">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="Drinks"
        android:id="@+id/posTxt"
        android:padding="10dp"

        />

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/image"
        android:padding="10dp"
        android:src="@drawable/ghost"
        android:layout_below="@+id/posTxt"
        />

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"

        android:text="Name"
        android:id="@+id/nameTxt"
        android:padding="10dp"
        android:textColor="@color/colorGreen"
        android:layout_below="@+id/image"

        />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:text=" This is the best drink"
        android:id="@+id/descTxt"
        android:padding="10dp"
        android:layout_below="@+id/nameTxt"
        android:layout_alignParentLeft="true"
        />



</RelativeLayout>

</android.support.v7.widget.CardView>

и мой код activity_main.xml выглядит так:

<android.support.v4.widget.DrawerLayout   
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawyerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"

tools:context="com.hasan.tablayout.MainActivity">


<android.support.design.widget.CoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">



        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

        </android.support.v7.widget.Toolbar>



        <android.support.design.widget.TabLayout
            android:id="@+id/tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabMode="fixed"
            app:tabGravity="fill"/>




    </android.support.design.widget.AppBarLayout>
    <include layout="@layout/content_main"/>



    <android.support.v4.view.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"  />

</android.support.design.widget.CoordinatorLayout>



<android.support.design.widget.NavigationView
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    app:menu="@menu/navigation_menu"
    android:layout_gravity="start"
    app:headerLayout="@layout/navigation_header"/>




</android.support.v4.widget.DrawerLayout>

Я добавил card_view:cardCornerRadius , card_view:cardElevation в свой XML-код. Но я не понимаю, где моя ошибка?


person Md. Hasanur Rahman    schedule 14.11.2017    source источник
comment
Что значит Не отображается должным образом? Чего именно вы пытаетесь достичь?   -  person Paresh Mayani    schedule 14.11.2017
comment
Посмотрите на изображение, которое я дал. Все элементы cardView, кроме последнего, отображают все содержимое. Но последний cardView не показывает все содержимое. Некоторое содержимое отсутствует.   -  person Md. Hasanur Rahman    schedule 14.11.2017
comment
Пожалуйста, поделитесь тем, что вам нужно в изображении или более подробном описании.   -  person Upendra Shah    schedule 14.11.2017
comment
Я дал изображение в начале моего вопроса. Там все карты, кроме последней карты, отображают текстовое представление, изображение, текстовое представление, текстовое представление соответственно. Но последние два текстовых просмотра последней карты отсутствуют. Что я могу сделать сейчас?   -  person Md. Hasanur Rahman    schedule 14.11.2017
comment
Вы говорите о такой проблеме: - stackoverflow.com/ вопросы/35679445/ ?   -  person InsaneCat    schedule 14.11.2017
comment
да что-то подобное..   -  person Md. Hasanur Rahman    schedule 14.11.2017