Open knjk04 opened 5 years ago
(I've also tried PIcasso instead of Fresco because Picasso doesn't require you to initialise it)
The code runs if you change
View view = inflater.inflate(R.layout.activity_search_results, viewGroup, false);
to:
View view = inflater.inflate(R.layout.single_list_row, viewGroup, false);
in onCreateViewHolder(), but the image still isn't showing, even if I don't set the image in onBindViewHolder().
UPDATE: the images are being set in the Preview Activity, but still not in the RecyclerView search results list.
Branch: experimental
Error:
Culprit:
viewHolder.draweeView.setImageURI(uri);
The viewholder isn't null, the draweeview is. I'm doing Fresco.initialize(this) in SearchResultsActivity before calling the constructor on a bookListAdapter object reference. I'm doing the findViewById in the ViewHolder inner class in BookListAdapter, so it shouldn't be null.
The recyclerview cardview list won't show at all whilst the culprit is there.
If I do Fresco. initialize in SearchableActivity (before setContentView), in the ViewHolder constructor or in the BookListAdapter constructor, I get the 'Fresco has already been initialized' warning.