From 1047c06b7957febd6f4158d58e077e485aff4f7f Mon Sep 17 00:00:00 2001 From: ynerant Date: Thu, 5 Dec 2019 19:23:45 +0100 Subject: [PATCH] =?UTF-8?q?Valeur=20par=20d=C3=A9faut=20du=20nombre=20de?= =?UTF-8?q?=20points=20r=C3=A9alis=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ynerant/tarot/ui/newgame/NewGameFragment.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java b/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java index 022701f..11102bf 100644 --- a/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java +++ b/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java @@ -21,8 +21,6 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProviders; -import org.apache.commons.io.IOUtils; - import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; @@ -38,12 +36,9 @@ import fr.ynerant.tarot.ui.home.HomeFragment; public class NewGameFragment extends Fragment { - private NewGameViewModel newGameViewModel; - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - newGameViewModel = - ViewModelProviders.of(this).get(NewGameViewModel.class); + ViewModelProviders.of(this).get(NewGameViewModel.class); final View root = inflater.inflate(R.layout.fragment_new_game, container, false); if (PreferenceManager.getDefaultSharedPreferences(MainActivity.INSTANCE).getString("token", null) == null) { @@ -398,15 +393,19 @@ public class NewGameFragment extends Fragment { switch (progress) { case 1: textView.setText(R.string.one_end); + attack_points.setProgress(51); break; case 2: textView.setText(R.string.two_ends); + attack_points.setProgress(41); break; case 3: textView.setText(R.string.three_ends); + attack_points.setProgress(36); break; default: textView.setText(R.string.null_end); + attack_points.setProgress(56); break; } @@ -460,7 +459,7 @@ public class NewGameFragment extends Fragment { } }); - attack_points.setProgress(46); + attack_points.setProgress(51); View.OnClickListener onHandleClick = new View.OnClickListener() { @Override