Skip to content Skip to sidebar Skip to footer

Glide Error When Loading A Recyclerview "you Must Pass In A Non Null View"

Hi I am trying to populate a Grid RecyclerView with a series of Images. To do that I fetch image urls from the web and load them into a List<>. The problem is that apparently

Solution 1:

Change your onCerateViewHolder method to:

@Overridepublic ShowHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            LayoutInflaterinflater= LayoutInflater.from(getActivity());
            ViewrootView= inflater.inflate(R.layout.list_item_row, parent, false);
            returnnewShowHolder(rootView);
    }

And change your holder constructor to:

publicShowHolder(View itemView) {
            super(itemView);
            mImageView = (ImageView) itemView.findViewById(R.id.imageView);
            progressBar = (ProgressBar) itemView.findViewById(R.id.progress);
   }

Post a Comment for "Glide Error When Loading A Recyclerview "you Must Pass In A Non Null View""