Android Studio Coordinatorlayout & Recyclerview Blank?
Runing my app i get a blank activity, for the time being i only have a list which should be projecting images, by reading these images addresses from JSON, and from the logcat i co
Solution 1:
In ImagesAddresses();
you are using Firebase
to retrieve the data from your webservice, and you get the results through the delegate method
onDataChange
. Since the execution of this method is asynchronous, what happens is that initViews();
and, therefore prepareData()
, are called before onDataChange
is called. As you can image android_image_urls
is still empty. What you have to do to fix is to call initViews();
from onDataChange
, making sure that it, initViews();
, runs on the UI Thread
.
Post a Comment for "Android Studio Coordinatorlayout & Recyclerview Blank?"