From e771101c6c390d13d8657a449ddf164db3c1aa30 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 30 May 2021 16:58:39 -0600 Subject: recent friend codes now clears errortext if any --- .../main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java') diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java index ded5e65..53828f9 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/WatchCodeAdapter.java @@ -13,6 +13,7 @@ import androidx.databinding.ObservableArrayList; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.button.MaterialButton; +import com.google.android.material.textview.MaterialTextView; import java.util.ArrayList; @@ -22,11 +23,13 @@ import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity; public class WatchCodeAdapter extends RecyclerView.Adapter{ ObservableArrayList entries; Context context; + MaterialTextView errorText; ArrayList recentCodes; - public WatchCodeAdapter(Context context, ObservableArrayList entries) { + public WatchCodeAdapter(Context context, ObservableArrayList entries, MaterialTextView errorText) { this.context = context; this.entries = entries; + this.errorText = errorText; this.recentCodes = new ArrayList<>(); } @@ -50,6 +53,7 @@ public class WatchCodeAdapter extends RecyclerView.Adapter { + errorText.setText(""); Intent intent = new Intent(view.getContext(), WiimmfiActivity.class); intent.putExtra("friendCode", currentFC); context.startActivity(intent); -- cgit v1.2.3