Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KGregPFerenc
AndroidOnlabKviz2018
Commits
720f0ce0
Commit
720f0ce0
authored
Apr 29, 2018
by
fpeterfalvi
Browse files
Bugfix: new line character corrected
Now the saved database files can be opened correctly.
parent
b6911584
Changes
2
Hide whitespace changes
Inline
Side-by-side
KvizServer/app/src/main/java/onlab/kvizserver/GameActivity.java
View file @
720f0ce0
...
...
@@ -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
();
...
...
KvizServer/app/src/main/java/onlab/kvizserver/QuestionListAdapter.java
View file @
720f0ce0
...
...
@@ -90,6 +90,7 @@ public class QuestionListAdapter extends RecyclerView.Adapter<QuestionListAdapte
public
void
onClick
(
View
view
)
{
item
.
setEnabled
(!
item
.
isEnabled
());
notifyItemChanged
(
position
);
item
.
save
();
}
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment