aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorMatthew Wong <wongma7@outlook.com>2016-06-30 20:16:12 -0400
committerMatthew Wong <wongma7@outlook.com>2016-06-30 20:16:12 -0400
commit7da9633a3c7c102c08f0e5266577f680629b478d (patch)
treecfdb40d2d3a2342146df0123368e22388d66ac63 /app/src/main/java/com
parenta49399ab545eeb1ee62cf0a1f64794a434ef061f (diff)
use runOnUiThread in autofill preferences activity
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
index 79f6565b..b3991238 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
@@ -74,7 +74,11 @@ public class AutofillPreferenceActivity extends AppCompatActivity {
private class populateTask extends AsyncTask<Void, Void, Void> {
@Override
protected void onPreExecute() {
- findViewById(R.id.progress_bar).setVisibility(View.VISIBLE);
+ runOnUiThread(new Runnable() {
+ public void run() {
+ findViewById(R.id.progress_bar).setVisibility(View.VISIBLE);
+ }
+ });
}
@Override
@@ -105,13 +109,16 @@ public class AutofillPreferenceActivity extends AppCompatActivity {
@Override
protected void onPostExecute(Void aVoid) {
- findViewById(R.id.progress_bar).setVisibility(View.GONE);
-
- recyclerView.setAdapter(recyclerAdapter);
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- recyclerView.scrollToPosition(recyclerAdapter.getPosition(extras.getString("appName")));
- }
+ runOnUiThread(new Runnable() {
+ public void run() {
+ findViewById(R.id.progress_bar).setVisibility(View.GONE);
+ recyclerView.setAdapter(recyclerAdapter);
+ Bundle extras = getIntent().getExtras();
+ if (extras != null) {
+ recyclerView.scrollToPosition(recyclerAdapter.getPosition(extras.getString("appName")));
+ }
+ }
+ });
}
}