Valeur par défaut du nombre de points réalisés

This commit is contained in:
ynerant 2019-12-05 19:23:45 +01:00
parent 7a8f29f29d
commit 1047c06b79
1 changed files with 6 additions and 7 deletions

View File

@ -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,11 +36,8 @@ 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);
final View root = inflater.inflate(R.layout.fragment_new_game, container, false);
@ -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