diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-05-30 23:04:42 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-05-30 23:04:42 -0600 |
commit | 72c839bd12c37b95776f2a03f98c52036b9400fc (patch) | |
tree | ba0b4dc7109b16b521f83ff6a0c0884edbd4fd71 /app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java | |
parent | e771101c6c390d13d8657a449ddf164db3c1aa30 (diff) | |
download | wiimmfi-watcher-72c839bd12c37b95776f2a03f98c52036b9400fc.tar wiimmfi-watcher-72c839bd12c37b95776f2a03f98c52036b9400fc.tar.gz wiimmfi-watcher-72c839bd12c37b95776f2a03f98c52036b9400fc.tar.bz2 |
added dialog between main and wiimmfi activities, updated todo list for release
Diffstat (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java')
-rw-r--r-- | app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java index 53828f9..7034888 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java @@ -1,5 +1,6 @@ package me.brysonsteck.wiimmfiwatcher; +import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; @@ -24,12 +25,15 @@ public class WatchCodeAdapter extends RecyclerView.Adapter<WatchCodeAdapter.View ObservableArrayList<FriendCode> entries; Context context; MaterialTextView errorText; + ProgressDialog progressBar; ArrayList<String> recentCodes; - public WatchCodeAdapter(Context context, ObservableArrayList<FriendCode> entries, MaterialTextView errorText) { + public WatchCodeAdapter(Context context, ObservableArrayList<FriendCode> entries, + MaterialTextView errorText, ProgressDialog progressBar) { this.context = context; this.entries = entries; this.errorText = errorText; + this.progressBar = progressBar; this.recentCodes = new ArrayList<>(); } @@ -53,6 +57,12 @@ public class WatchCodeAdapter extends RecyclerView.Adapter<WatchCodeAdapter.View } fcButton.setText(currentFC); fcButton.setOnClickListener(view -> { + progressBar.setCancelable(true); + progressBar.setMessage(holder.itemView.getResources().getString(R.string.locating_text, currentFC)); + progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER); + progressBar.setProgress(0); + progressBar.setMax(100); + progressBar.show(); errorText.setText(""); Intent intent = new Intent(view.getContext(), WiimmfiActivity.class); intent.putExtra("friendCode", currentFC); |