Android Card view crashing when I scroll down

My Cardview consists of an image view & a text view. There are total 10 images and texts to be inflated into the view on a staggered/grid view. When I’m scrolling down after 6 images in a grid, the app is crashing and restarting. I tested the same on my brother’s mobile which is Oreo and scrolling was working fine eventhough it was slow scrolling. And on other android versions which I tested, the app was found to crash everytime when it reaches 6 images on scroll. All the image sizes are less than 30 kb. Can someone help me on solving this issue?

This is the cardview layout file

 <?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:layout_width="match_parent"
android:layout_height="400dp"
android:layout_margin="5dp"
android:background="#000"
card_view:cardBackgroundColor="?android:attr/actionMenuTextColor"
card_view:cardCornerRadius="10dp"
card_view:cardElevation="15dp"


<LinearLayout
    android:id="@+id/photo_item"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">


    <TextView
        android:id="@+id/txv_row"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="fill_horizontal"
        android:gravity="center"
        android:text="Hello, How are you?"
        android:textAlignment="center"
        android:textColor="@color/common_google_signin_btn_text_dark_pressed"
        android:textSize="25dp"
        android:textStyle="bold" />

    <ImageView
        android:id="@+id/img_row"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/txv_row"
        android:layout_gravity="center"
        android:focusableInTouchMode="true"
        android:scaleType="fitXY" />

</LinearLayout>

Data File

package com.example.prince.itq;
import java.util.ArrayList;
import java.util.Locale;
public class Data {
public static ArrayList<Information> getData() {
    ArrayList<Information> data = new ArrayList<>();
    int[] images = {
            R.drawable.itq_books,
            R.drawable.itq_companies,
            R.drawable.itq_currentaffairs,
            R.drawable.itq_expand,
            R.drawable.itq_internet,
            R.drawable.itq_history,
            R.drawable.itq_security,
            R.drawable.itq_opensource,
            R.drawable.itq_person,
            R.drawable.itq_startup,
            R.drawable.itq_women
    };
    String[] Categories = { "BOOKS","COMPANIES","CURRENT AFFAIRS","EXPAND","INTERNET","HISTORY","SECURITY","OPEN SOURCE","PERSON","IT STARTUP","WOMEN"};

    for(int i=0;i<images.length;i++)
    {
        Information current=new Information();
        current.title= Categories[i];
        current.imageId=images[i];
        data.add(current);
    }
    return data;
}

}

MyCustomAdapter

package com.example.prince.itq;

import android.content.Context;

import android.support.v7.widget.RecyclerView;

import android.view.LayoutInflater;

import android.view.View;

import android.view.ViewGroup;

import android.widget.ImageView;

import android.widget.LinearLayout;

import android.widget.TextView;

import java.util.ArrayList;

public class MyCustomAdapter extends RecyclerView.Adapter {

Context context;
ArrayList<Information> data;
int previousPosition=0;
LayoutInflater inflator;

public MyCustomAdapter(Context context, ArrayList<Information> data) {
     this.context=context;
    this.data=data;
    inflator=LayoutInflater.from(context);
}

@Override
public MyCustomAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view=inflator.inflate(R.layout.list_item_row,parent,false);
    MyViewHolder holder=new MyViewHolder(view);
    return holder;
}

@Override
public void onBindViewHolder(MyViewHolder myViewHolder, int position) {
    if (position != RecyclerView.NO_POSITION) {
        if(data.get(position).title != null) {
            myViewHolder.textView.setText(data.get(position).title);
            myViewHolder.imageView.setImageResource(data.get(position).imageId);

        }

        if (position > previousPosition) {
            AnimationUtil.animate(myViewHolder, true);
        } else {
            AnimationUtil.animate(myViewHolder, false);
        }
        previousPosition = position;
    }

}

@Override
public int getItemCount() {
    return data.size();
}

class MyViewHolder extends RecyclerView.ViewHolder{
    TextView textView;
    ImageView imageView;
    LinearLayout layout;

    public MyViewHolder(View itemView) {
        super(itemView);
        layout = (LinearLayout) itemView.findViewById(R.id.photo_item);
        textView = (TextView) itemView.findViewById(R.id.txv_row);
        imageView = (ImageView) itemView.findViewById(R.id.img_row);
    }
        LinearLayout getLayoutView() {
            return layout;
        }

        ImageView getImageView() {
            return imageView;
        }
    }
}

Information.java

package com.example.prince.itq;

public class Information

{
public int imageId;

public String title;

}

HomeActivity.java

package com.example.prince.itq;

import android.content.Context;

import android.content.Intent;

import android.database.Cursor;

import android.os.Bundle;

import android.support.design.internal.NavigationMenuView;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;
import com.example.prince.itq.CommonValues.*;
import com.example.prince.itq.sqlite.Sql_users;
import java.util.List;


public class HomeActivity extends AppCompatActivity      implements 
   NavigationView.OnNavigationItemSelectedListener {
 private TextView name,email;
 private  View view;
//the recyclerview
 RecyclerView recyclerView;
 MyCustomAdapter adapter;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home2);
    recyclerView= (RecyclerView) findViewById(R.id.recyclerView);
    adapter =new MyCustomAdapter(this,Data.getData());
    recyclerView.setAdapter(adapter);
    GridLayoutManager mGridLayoutManager=new GridLayoutManager(this,2);
    recyclerView.setLayoutManager(mGridLayoutManager);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    NavigationView navigationView =(NavigationView)findViewById(R.id.nav_view);
    view=navigationView.getHeaderView(0);

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    navigationView.setNavigationItemSelectedListener(this);
    final Sql_users sql_users =new Sql_users(getApplicationContext());
    sql_users.OpenDb();
    Cursor c=sql_users.Get_userData();
    c.moveToFirst();
    name= (TextView) view.findViewById(R.id.name);
    email= (TextView) view.findViewById(R.id.email);
    name.setText(""+c.getString(0));
    email.setText(""+c.getString(1));

   /* LayoutInflater layoutInflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = layoutInflater.inflate(R.layout.activity_home2, null );

*/

        //setting adapter to recyclerview

       // adapter.setClickListener(this);
    }






@Override
public void onBackPressed() {
    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    if (drawer.isDrawerOpen(GravityCompat.START)) {
        drawer.closeDrawer(GravityCompat.START);
    } else {
        super.onBackPressed();
    }
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    MenuItem menuItem,menuItem1;
    menuItem= (MenuItem) findViewById(R.id.linearViewVertical);
    menuItem1= (MenuItem) findViewById(R.id.gridView);
    //noinspection SimplifiableIfStatement

  switch (id)
  {
  case R.id.gridView:
      GridLayoutManager mGridLayoutManager=new GridLayoutManager(this,2);
      recyclerView.setLayoutManager(mGridLayoutManager);

      break;
  case R.id.linearViewVertical:
      LinearLayoutManager mLinearLayoutManager=new 
LinearLayoutManager(this);
      mLinearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
      recyclerView.setLayoutManager(mLinearLayoutManager);

      break;

  case R.id.linearViewVertical1:
      Intent intent = new Intent(HomeActivity.this,QuizActivity.class);
      startActivity(intent);
      finish();

      break;

}

    return super.onOptionsItemSelected(item);
}

@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
    // Handle navigation view item clicks here.
    int id = item.getItemId();

    if (id == R.id.nav_camera) {

        Intent n=new Intent(this, PlayAgain.class);
        startActivity(n);

        // Handle the camera action
    } else if (id == R.id.nav_gallery) {
        Intent i=new Intent(this, QuizActivity.class);
        startActivity(i);

    } else if (id == R.id.nav_slideshow) {

    } else if (id == R.id.nav_manage) {

    } else if (id == R.id.nav_share) {

    } else if (id == R.id.nav_send) {

    }

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    drawer.closeDrawer(GravityCompat.START);
    return true;
}

}