From 3103a0f276e9de86529e29b97a94ccce8cca87e5 Mon Sep 17 00:00:00 2001 From: TebbeUbben Date: Sun, 13 May 2018 13:40:34 +0200 Subject: [PATCH] Some styling for SW --- app/src/main/AndroidManifest.xml | 1 + .../startupwizard/SWDefinition.java | 6 -- .../startupwizard/SetupWizardActivity.java | 5 ++ .../main/res/drawable-hdpi/ic_exit_to_app.png | Bin 0 -> 602 bytes .../main/res/drawable-mdpi/ic_exit_to_app.png | Bin 0 -> 295 bytes .../res/drawable-xhdpi/ic_exit_to_app.png | Bin 0 -> 499 bytes .../res/drawable-xxhdpi/ic_exit_to_app.png | Bin 0 -> 965 bytes .../res/drawable-xxxhdpi/ic_exit_to_app.png | Bin 0 -> 1121 bytes .../main/res/layout/activity_setupwizard.xml | 70 +++++++++++------- app/src/main/res/values/colors.xml | 6 ++ app/src/main/res/values/styles.xml | 7 ++ 11 files changed, 61 insertions(+), 34 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_exit_to_app.png create mode 100644 app/src/main/res/drawable-mdpi/ic_exit_to_app.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_exit_to_app.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_exit_to_app.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_exit_to_app.png 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 0000000000000000000000000000000000000000..f028ac5539190cb1b08a05921af761f68478d30a GIT binary patch literal 602 zcmV-g0;Tn7{-4O3WeoAAR0EiYIGDf6oh6AwM50rE(*OyMC@ioLLxqrl^`Ke5UQ>1|FD%( zh0x%USLVpsy~jOf_Uz^qJI(z#Gjo6QJoC=`&J{gt>KPB4Ky8jRDr9>na0=K9Y;Bt) z^Z8F;8F($}>*}!sK(==P_kfc?yx)@fgKgb^0Ri$3I49{#eLxe?Y2XPEDy?Vx224qM z&<1n?m`lnm0q+5KNOl-Fmgc-A>1rF$C15snx&y@Lu7JXk8Q^A`b57E94$yo6N$Ld1 zb^u*YK*2HFIgsr=5si`-+iYETpmaP$L>`TmOL{sCY9oMd09R4~d>d(`P4*<`BfQ$Ai1;T)RMGEBrRef!b z0dIia@F!t6+E)Z*`yen;05%Rx0^8Eq0sBgUrhwZ8KrtlLsi&hA_LTy~$y^FlK~?LC z#2E+c!}y{Us9%-Z@Cu06C|5$6i@<`UAGOV&pE`1ZZ0`eJ0ox=<(wXczD(CD)lMnuesB{5_PTPzvS#lph5Fux5q2E@5L0 zRg^^)`d=k%?~430z~c?N22D%4U$?&LUN(~MWygW-tCD5zwrQ->fbT%m;AbU8sq(k= o|0>;u1Z$aN^Y558^?Ik!Z}(|HG$4MD%K!iX07*qoM6N<$f}1E1aR2}S literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d2531b3e4622775748150a62b95aedf44bf100f8 GIT binary patch literal 295 zcmV+?0oeYDP)UGt@H3_0Dgf9umVPTNFl%@No==)P#wctklKI% zx7`7jz#tDP1hD;=q=<#Qg^CGwmg_wLv9H&bD0z}?Kk9?}Wf}pbZL|XUDK#pR4ZCNI t>#d~Ty=j_u;ly;Va{k(#T;+!`pA+lBtQp)9@i_nh002ovPDHLkV1k8KeGC8q literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d35a1f0d4e7bafa08134853aa1525f89d7826eaf GIT binary patch literal 499 zcmVF##(iHHSv}ILO}>Ue)#Z~*80k#p#@ zEJRQMN$0>xYSl|Yga%j#o`9ucAu0hV8@I{vk~V=yAbt51QX)7&4@S~9@Bqx0RiY69 z4q^wm&&Xs4D$y7K2eAv>0y9OGs02XLpR3$wPXH6Zc*Z|6m8c3Jol1BzAv(_cYjX|G?K*+JRnZrl$X?m~+9iK*y` p5qezv%-Sm8xdLqnc`l&$^dF?kPC)8cFIE5m002ovPDHLkV1ji?%>@7e literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..884eb3b24215fdb3d71e5edd6f82df775e31450f GIT binary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8bFr`8-N$U!5R>n2hc%qvr;dC1EnDtfPZ5_n}Aoq{*n+3 zK%d&GIs?20_LYKQ02U~%s#}0Jz}^xN48S5PtLj$ZE#SKzC%SiJ00vZZRow=>3s^7~ z1z{opsOr#V8Jp-CUJwj`0q|Oy zm`|oWp1o>+Hw-crYeVzMl*g;L_>%;{x}ifVL-y6tc`D*~UYq(58&9hArEMr8y{6tC zZ7|MTs`Q379GzZMZ;z^K6EfavB{o!5o03edskb{-wMltzwGtb4%Tk^Khdo^fePsFg zoR+bmaiu%`9?mY(`+v&wUDv?3_z@MiOLy(L_)^8F#xg3B`RkC5(ydWW?BH)wv_>d zV>a!xjavr`JSQS*}U7fuV1|C{qDA}4?5B$ zxC!b;1+N1aEd}N&Q04%K4uBnDGQakfJ;J1eV2AiXokM*3;djSaxdUw6hDz=mV5uKt z<=Xns-7!{os~uxy?SC2tqF%yjLYo(-fB~pn4-9|-sH{Nc@Rk7vpt1s$!&?RzfXWI~ n4sRJ?04gg`IlN^+WdMHwyDFxC)>=5B00000NkvXXu0mjfe3j?~ literal 0 HcmV?d00001 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">