X-Git-Url: http://gitweb.fperrin.net/?p=Dictionary.git;a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryActivity.java;h=77454f9a3e0032af41d5b056de722c577747fdc2;hp=12839caeddcf3d6c351e0a2a137fe4508c38fc1a;hb=ca5ee70f5d48b4218e15949b7b77b397a281d676;hpb=391dab855e05ef1e244fc52adf3176e5fc10bb7b diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index 12839ca..77454f9 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -1351,7 +1351,9 @@ public class DictionaryActivity extends AppCompatActivity { Log.d(LOG, "searchFinished: " + searchOperation + ", searchResult=" + searchResult); currentSearchOperation = null; - uiHandler.postDelayed(new Runnable() { + // Note: it's important to post to the ListView, otherwise + // the jumpToRow will randomly not work. + getListView().post(new Runnable() { @Override public void run() { if (currentSearchOperation == null) { @@ -1370,7 +1372,7 @@ public class DictionaryActivity extends AppCompatActivity { Log.d(LOG, "More coming, waiting for currentSearchOperation."); } } - }, 20); + }); } private void jumpToRow(final int row) {