diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b6fa5f8796..35051e0751 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -170,6 +170,7 @@ diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java index 906d579a47..33dc02457a 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SWDefinition.java @@ -76,12 +76,6 @@ public class SWDefinition { .add(new SWInfotext() .label(R.string.backupismissing) .visibility(() -> !ImportExportPrefs.file.exists())) - .add(new SWButton() - .text(R.string.exitwizard) - .action(() -> { - SP.putBoolean(R.string.key_setupwizard_processed, true); - getActivity().finish(); - })) ) .add(new SWScreen(R.string.language) .skippable(false) diff --git a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java index bdde6d00d2..25b31d89c1 100644 --- a/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/startupwizard/SetupWizardActivity.java @@ -60,6 +60,11 @@ public class SetupWizardActivity extends AppCompatActivity { @Override public void onBackPressed() { + if (currentWizardPage == 0) OKDialog.showConfirmation(this, MainApp.gs(R.string.exitwizard), this::finish); + else showPreviousPage(null); + } + + public void exitPressed(View view) { OKDialog.showConfirmation(this, MainApp.gs(R.string.exitwizard), this::finish); } diff --git a/app/src/main/res/drawable-hdpi/ic_exit_to_app.png b/app/src/main/res/drawable-hdpi/ic_exit_to_app.png new file mode 100644 index 0000000000..f028ac5539 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_exit_to_app.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_exit_to_app.png b/app/src/main/res/drawable-mdpi/ic_exit_to_app.png new file mode 100644 index 0000000000..d2531b3e46 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_exit_to_app.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_exit_to_app.png b/app/src/main/res/drawable-xhdpi/ic_exit_to_app.png new file mode 100644 index 0000000000..d35a1f0d4e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_exit_to_app.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png b/app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png new file mode 100644 index 0000000000..884eb3b242 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png b/app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png new file mode 100644 index 0000000000..903a7230fd Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png differ diff --git a/app/src/main/res/layout/activity_setupwizard.xml b/app/src/main/res/layout/activity_setupwizard.xml index ee43383d58..6141bd53b6 100644 --- a/app/src/main/res/layout/activity_setupwizard.xml +++ b/app/src/main/res/layout/activity_setupwizard.xml @@ -1,29 +1,44 @@ + + + android:textAlignment="center" + android:textColor="#FFFFFF" + android:textSize="32sp" + tools:text="Title" /> - - - + android:layout_height="0dp" + android:layout_weight="1"> + + + android:orientation="horizontal" + android:paddingLeft="16dp" + android:paddingRight="16dp">