Skip to content

Commit

Permalink
ScAsk
Browse files Browse the repository at this point in the history
  • Loading branch information
sashaqwert committed Mar 5, 2018
1 parent 066ced0 commit ac51b29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "ru.sccraft.scask"
minSdkVersion 17
targetSdkVersion 27
versionCode 11
versionName "0.2"
versionCode 12
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/java/ru/sccraft/scask/DoneActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,20 @@ protected Intent doInBackground(Void... params) {
String tittle = "User statistics\n";
String разделитель = "=================================================================\n";
String data = tittle + разделитель;
float процент_решения = (верно / вопросы.length) * 100;
data += "DONE: " + процент_решения + "%" + "\n" + разделитель;
//double процент_решения = (верно / вопросы.length) * 100;
//data += "DONE: " + процент_решения + "%" + "\n" + разделитель;
String решено = "";
for (Question вопрос : вопросы) {
if (вопрос.проверить_ответ()) {
решено = getString(R.string.yes);
} else {
решено = getString(R.string.no);
}
data += вопрос.вопрос + "\n" + getString(R.string.addQuestion_answer) + вопрос.получить_ответ() + "\n" + getString(R.string.done_right) + решено + "\n" + разделитель;
data += вопрос.вопрос + "\n" + getString(R.string.addQuestion_answer) + " " + вопрос.получить_ответ() + "\n" + getString(R.string.done_right) + решено + "\n" + разделитель;
}
data = data + "END OF USER DATA";
data = data.replace("true", getString(R.string.yes));
data = data.replace("false", getString(R.string.no));

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
Expand Down

0 comments on commit ac51b29

Please sign in to comment.