so I'm using a static adapter to notify the Recycler view from outside my fragment.
and when I call notifyAll()
it throws: object not locked by thread before notify() in notifyAll()
I've tried the solution linked here: Object not locked by thread before notify() in onPostExecute
but using:
synchronized(adapter){
// notify() is being called here when the thread and
// synchronized block does not own the lock on the object.
adapter.notifyAll();
}
did not fix my problem! then I've used this:
synchronized(adapter){
// notify() is being called here when the thread and
// synchronized block does not own the lock on the object.
adapter.wait()
adapter.notifyAll();
}
it causes that the app Freezed with no responding at all! any suggestions, please??