From aec090b22e8b74ad5b69c869d0f631362d5c4fe0 Mon Sep 17 00:00:00 2001 From: "luca0N\\!" Date: Wed, 3 Mar 2021 22:09:26 -0300 Subject: [PATCH] Hide ProgressBar on network error Based on #5. --- .../luca0n/joguitos/pluck/activities/TriviaGameActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/luca0n/joguitos/pluck/activities/TriviaGameActivity.java b/app/src/main/java/com/luca0n/joguitos/pluck/activities/TriviaGameActivity.java index 0367f7a..3ec6377 100644 --- a/app/src/main/java/com/luca0n/joguitos/pluck/activities/TriviaGameActivity.java +++ b/app/src/main/java/com/luca0n/joguitos/pluck/activities/TriviaGameActivity.java @@ -164,6 +164,9 @@ public class TriviaGameActivity extends BaseActivity String msg = getResources().getString(R.string.error_network); Fragment errorFragment = TriviaGameErrorFragment.newInstance(msg); + // Hide the progress bar. + progressBar.setVisibility(View.GONE); + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.frame_trivia_game, errorFragment); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);