title: Grid Layout and CardView Not Showing up on old Android Device
body: <p>I am looking for a solution. 
  Grid Layout using cardView is showing up on latest device nicely, but the older devices like Lollipop and some other versions of Android device not showing up the the Grid Layout and CardView. 
  please give me the solution as if i can buildup my project.
  Thanks</p>
  
  <p>here is my layout code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout 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:layout_width="match_parent"
      android:layout_height="match_parent"
      android:name="com.facebook.ads.AudienceNetworkActivity"
      android:hardwareAccelerated="true"
      tools:context=".MainActivity"&gt;
  
  
      &lt;View
          android:layout_width="match_parent"
          android:layout_height="230dp"
          android:id="@+id/bg_top_header"
          app:layout_constraintHorizontal_bias="0.0"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          android:background="@drawable/ic_bg_topheader"/&gt;
  
      &lt;ImageView
          android:id="@+id/user_photo"
          android:layout_width="71dp"
          android:layout_height="71dp"
          android:layout_marginStart="26dp"
          android:layout_marginTop="24dp"
          android:src="@mipmap/ic_launcher"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          android:layout_marginLeft="26dp" /&gt;
  
      &lt;TextView
          android:textSize="20sp"
          android:text="বাংলা ইসলামিক "
          android:id="@+id/user_name"
          android:textColor="#ffffff"
          android:fontFamily="@font/mo_re"
          android:layout_marginTop="30dp"
          android:layout_marginStart="18dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:layout_constraintStart_toEndOf="@id/user_photo"
          app:layout_constraintTop_toTopOf="parent"
          android:layout_marginLeft="18dp" /&gt;
  
      &lt;TextView
          android:textSize="16sp"
          android:text="নিউজ পোর্টাল"
          android:id="@+id/user_id"
          android:fontFamily="@font/mo_re"
          android:textColor="#ffffff"
          android:layout_marginTop="32dp"
          android:layout_marginStart="18dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:layout_constraintStart_toEndOf="@id/user_photo"
          app:layout_constraintTop_toTopOf="@id/user_name"
          android:layout_marginLeft="18dp" /&gt;
  
      &lt;GridLayout
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_marginTop="110dp"
          android:layout_marginBottom="60dp"
          android:alignmentMode="alignMargins"
          android:columnCount="2"
          android:columnOrderPreserved="false"
          android:padding="14dp"
          android:rowCount="3"
  
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintTop_toTopOf="@id/bg_top_header"
          app:layout_constraintVertical_bias="0.0"
          app:layout_editor_absoluteX="0dp"&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_our_islam"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/ourislams" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="@string/t_ourislam"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:layout_marginTop="8dp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_islam_times"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/islamtimes" /&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="@string/t_islamtimes"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:layout_marginTop="8dp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_insaf"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/insaf"/&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="@string/t_insaf"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:layout_marginTop="8dp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_patheo"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/patheo"/&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="@string/t_patheo"
                      android:layout_marginTop="8dp"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_iab_news"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/iabnews"/&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="@string/t_iab"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:layout_marginTop="8dp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;android.support.v7.widget.CardView
              android:clickable="true"
              android:id="@+id/btn_suggest"
              android:layout_width="0dp"
              android:layout_height="0dp"
              android:layout_rowWeight="1"
              android:layout_columnWeight="1"
              android:layout_marginLeft="16dp"
              android:layout_marginRight="16dp"
              android:layout_marginBottom="16dp"
              android:background="@color/cardColor"
              app:cardCornerRadius="8dp"
              app:cardElevation="6dp"&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center_horizontal|center_vertical"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:orientation="vertical"&gt;
  
                  &lt;ImageView
                      android:layout_width="120dp"
                      android:layout_height="50dp"
                      android:layout_gravity="center_horizontal"
                      android:background="@drawable/suggest"/&gt;
  
                  &lt;TextView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:text="উপদেশ দিন"
                      android:layout_marginTop="8dp"
                      android:textColor="@color/textcardColor"
                      android:textSize="14sp"
                      android:fontFamily="@font/mo_re"
                      android:textStyle="bold"/&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/android.support.v7.widget.CardView&gt;
  
  
  
  
  
  
  
  
      &lt;/GridLayout&gt;
  
  
      &lt;LinearLayout
          android:id="@+id/banner_container"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:layout_constraintBottom_toBottomOf="parent"
          android:orientation="vertical"/&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>build.gradle file</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.tanbhirhossain.binp"
          minSdkVersion 15
          targetSdkVersion 28
          versionCode 10
          versionName "10.0.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
  
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support:support-v4:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.facebook.android:audience-network-sdk:5.+'
      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.android.support:gridlayout-v7:28.0.0'
  }
  </code></pre>