Controls cannot be retrieved in the adapter.

Issue: Unable to get controls in adapter

Currently, controls cannot be obtained via

findViewById inside the custom adapter for the carousel/banner.

// Custom adapter for carousel
this.imageUI = (ImageView) view.findViewById(R.id.image_view);
this.textViewUI = (TextView) view.findViewById(R.id.name);
Code language: JavaScript (javascript)

It turned out to be a caching issue. After commenting out the code and doing a full rebuild in Android Studio, it worked again.

Probably because Android Studio didn’t sync/update properly.

You can also try clicking the Build tab and rebuilding.

Controls cannot be retrieved in the adapter.

Leave a Reply

Your email address will not be published. Required fields are marked *