How to load images from url into viewpager2?
问题 I'm using ViewPager2 in my app to show some images it worked well when I used images from drawable but when i try to load images from links it shows error. I'm new to this so please help me how to load them from url. It throws error at the adapter class as items.size(); refers to null. Item Class public class ImageSlider1_Item { private String imageURL; public ImageSlider1_Item(String imageURL){ this.imageURL = imageURL; } public String getImageURL (){ return imageURL; } } Adapter Class