You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you very much for this awesome library. I'm new to Android SDK and it took me no time to use thanks to the example.
There is a bug crashing the app in the example project, I'm pretty sure it's thread related...
This crash can happen anytime while touching the list, but it is easy to reproduce by spamming the drag down gesture while "loading".
To fix it I changed the PullToRefreshActivity.java file like this
@Override
protected void onPostExecute(final String[] result) {
//previous code
// mListItems.addFirst("Added after refresh...");
//replacement code
((ArrayAdapter) getListAdapter()).insert("Added after refresh...", 0);
I presume the reason of the crash was that the ArrayAdapter was iterating mListItems while it was modified, not sure, but anyway this modification seems to work for me.
Feel free to share any comment :)
The text was updated successfully, but these errors were encountered:
First, thank you very much for this awesome library. I'm new to Android SDK and it took me no time to use thanks to the example.
There is a bug crashing the app in the example project, I'm pretty sure it's thread related...
This crash can happen anytime while touching the list, but it is easy to reproduce by spamming the drag down gesture while "loading".
To fix it I changed the PullToRefreshActivity.java file like this
@Override
protected void onPostExecute(final String[] result) {
//previous code
// mListItems.addFirst("Added after refresh...");
//replacement code
((ArrayAdapter) getListAdapter()).insert("Added after refresh...", 0);
I presume the reason of the crash was that the ArrayAdapter was iterating mListItems while it was modified, not sure, but anyway this modification seems to work for me.
Feel free to share any comment :)
The text was updated successfully, but these errors were encountered: