A method is for Custom View, and Asnyctask B is for getting URL. To load an image on Custom View with returned URL from Asynctask, I need to execute Custom View method after the asynctask. When I call the method after asynctask, the method gets null because asynctask didnt return the value yet. How can I handle this problem?
customView= findViewById(R.id.custom_view);
UrlRequest urlRequest = new UrlRequest(this).build(); // AsyncTask
customView.loadImg(urlRequest); // null value
On Logcat, customView.loadImg method run first, then urlRequest is returned.
I expect the returned data, but the actual output is null...