Quote:
Originally Posted by Jibninjas
You are probably correct though that it has something to do with the UI thread being called before the response is finished or something. Using multi threads can definitely be tricky when you are trying to have things happen in sequential order.
Without knowing more about your app/code, this advice may not be relevant. You probably want to set up the UI to point to a data source that is decoupled from the volley response. The array adapter is crashing on a null pointer. So a simple example would be like this:
initialize UI
initialize empty array
attach array to ArrayAdapter
attach ListView to ArrayAdapter
create data binding or notify/observe on array
in the binding/observing method call
adapter.notifyDataSetChanged()
make volley request
in volley response update the empty array.