Commit 720f0ce0 authored by fpeterfalvi's avatar fpeterfalvi
Browse files

Bugfix: new line character corrected

Now the saved database files can be opened correctly.
parent b6911584
......@@ -247,7 +247,7 @@ public class GameActivity extends AppCompatActivity implements GameControlFragme
OutputStream outputStream = new FileOutputStream(file);
List<Question> allQuestions = Question.listAll(Question.class);
for (int i = 0; i < allQuestions.size(); i++) {
outputStream.write((allQuestions.get(i).convertToString() + "\t").getBytes());
outputStream.write((allQuestions.get(i).convertToString() + "\n").getBytes());
}
outputStream.close();
Toast.makeText(this, "Saved to: " + file.getCanonicalPath(), Toast.LENGTH_LONG).show();
......
......@@ -90,6 +90,7 @@ public class QuestionListAdapter extends RecyclerView.Adapter<QuestionListAdapte
public void onClick(View view) {
item.setEnabled(!item.isEnabled());
notifyItemChanged(position);
item.save();
}
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment