Hello,

I used a sample code is reading images from R.java file. I want to change it as display from web. But it has an error. Because i sent parameter is drawable but it must be Integer. How do i it?

Current Code

PHP Code:
       image_prev = (ImageView)findViewById(R.id.image_prev);
        
image_centre = (ImageView)findViewById(R.id.image_centre);
        
image_next = (ImageView)findViewById(R.id.image_next);
        
        
image_res_ids = new ArrayList<Integer>();
        
image_res_ids.add(R.drawable.zero);
        
image_res_ids.add(R.drawable.one);
        
image_res_ids.add(R.drawable.two);
        
image_res_ids.add(R.drawable.three);
        
image_res_ids.add(R.drawable.four); 
i want to change with this

PHP Code:
 image_prev = (ImageView)findViewById(R.id.image_prev);
        
image_centre = (ImageView)findViewById(R.id.image_centre);
        
image_next = (ImageView)findViewById(R.id.image_next);
        
image_res_ids = new ArrayList<Integer>();
       
Drawable image loadImageFromURL("domainnamecom/image.png"));
       
image_res_ids.add(image); 

example is here: https://github.com/aveyD/Dynamic-Paging-Demo