Skip to content

Commit

Permalink
bugs fixed all around
Browse files Browse the repository at this point in the history
  • Loading branch information
matveevk committed May 3, 2017
1 parent 4e39937 commit d7ad87f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,6 @@ public void addAtt(String s) {
case "комбинаторика": ++Stats.att_comb; break;
case "геометрия": ++Stats.att_geom; break;
}
}

public void addCor(String s) {
switch (s) {
case "алгебра": ++Stats.cor_alg; break;
case "комбинаторика": ++Stats.cor_comb; break;
case "геометрия": ++Stats.cor_geom; break;
}

OutputStreamWriter outputStreamWriter = null;
try {
Expand All @@ -165,6 +157,14 @@ public void addCor(String s) {
}
}

public void addCor(String s) {
switch (s) {
case "алгебра": ++Stats.cor_alg; break;
case "комбинаторика": ++Stats.cor_comb; break;
case "геометрия": ++Stats.cor_geom; break;
}
}

public int screenWidth() {
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/example/root/prepolymp/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected void onCreate(Bundle savedInstanceState) {
DBManager dbProblems = new DBManager(this);
dbProblems.getWritableDatabase();

if (dbProblems.size() <= 3) { // TODO
if (dbProblems.size() == 0) {
dbProblems.addProblem(new Problem(1, "Найдите наименьшее натуральное число, кратное 99, в десятичной записи которого участвуют только чётные цифры.", "228888", "алгебра"));
dbProblems.addProblem(new Problem(3, "Найдите наименьшее натуральное число, кратное 99, в десятичной записи которого участвуют только чётные цифры.", "228888", "геометрия", 11));
dbProblems.addProblem(new Problem(2, "Найдите наименьшее натуральное число, кратное 99, в десятичной записи которого участвуют только чётные цифры.", "228888", "алгебра", 10));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent = new Intent(getActivity(), ProblemActivity.class);
intent.putExtra(EXTRA, i);
// TODO: 5/3/17 if change probText change following line
intent.putExtra(EXTRA, probText.get(i).charAt(2) - '1');
getActivity().startActivity(intent);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent = new Intent(getActivity(), ProblemActivity.class);
intent.putExtra(EXTRA, i);
// TODO: 5/3/17 if change probText change following line
intent.putExtra(EXTRA, probText.get(i).charAt(2) - '1');
getActivity().startActivity(intent);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent = new Intent(getActivity(), ProblemActivity.class);
intent.putExtra(EXTRA, i);
// TODO: 5/3/17 if change probText change following line
intent.putExtra(EXTRA, probText.get(i).charAt(2) - '1');
getActivity().startActivity(intent);
}
});
Expand Down

0 comments on commit d7ad87f

Please sign in to comment.