Hide ProgressBar on network error

Based on #5.
This commit is contained in:
luca0N! 2021-03-03 22:09:26 -03:00
parent 477ef165fa
commit aec090b22e
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 3 additions and 0 deletions

View File

@ -164,6 +164,9 @@ public class TriviaGameActivity extends BaseActivity
String msg = getResources().getString(R.string.error_network); String msg = getResources().getString(R.string.error_network);
Fragment errorFragment = TriviaGameErrorFragment.newInstance(msg); Fragment errorFragment = TriviaGameErrorFragment.newInstance(msg);
// Hide the progress bar.
progressBar.setVisibility(View.GONE);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.replace(R.id.frame_trivia_game, errorFragment); ft.replace(R.id.frame_trivia_game, errorFragment);
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);