diff --git a/oem/firstvoices/android/.editorconfig b/oem/firstvoices/android/.editorconfig new file mode 100644 index 0000000000..3d06afcbda --- /dev/null +++ b/oem/firstvoices/android/.editorconfig @@ -0,0 +1,8 @@ +root = true + +; applies to all files +[*] +indent_style = space + +[*.{java, sh, css, html, xml}] +indent_size = 4 diff --git a/oem/firstvoices/android/app/src/main/assets/setup/android-instructions.css b/oem/firstvoices/android/app/src/main/assets/setup/android-instructions.css index 5634bca7b7..947b2e3020 100644 --- a/oem/firstvoices/android/app/src/main/assets/setup/android-instructions.css +++ b/oem/firstvoices/android/app/src/main/assets/setup/android-instructions.css @@ -1,35 +1,35 @@ @font-face { font-family: "Nunito"; - src: url("nunito-regular-webfont.eot"); + src: url("nunito-regular-webfont.eot"); src: url("nunito-regular-webfont.ttf") format("truetype"), - url("nunito-regular-webfont.otf") format("opentype"), + url("nunito-regular-webfont.otf") format("opentype"), url("nunito-regular-webfont.woff") format("woff"), url("nunito-regular-webfont.svg#nunitoregular") format("svg"); } @font-face { font-family: "Open Sans"; - src: url("opensans-regular-webfont.eot"); + src: url("opensans-regular-webfont.eot"); src: url("opensans-regular-webfont.ttf") format("truetype"), - url("opensans-regular-webfont.otf") format("opentype"), + url("opensans-regular-webfont.otf") format("opentype"), url("opensans-regular-webfont.woff") format("woff"), url("opensans-regular-webfont.svg#open_sansregular") format("svg"); } html, body{ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - padding: 0; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + padding: 0; } html{ - margin: 0; - min-height: 100%; - position: relative; + margin: 0; + min-height: 100%; + position: relative; } body{ - background: #f7511e; + background: #f7511e; background: -moz-linear-gradient(25deg, #f7511e 0%, #aa1225 55%, #9f031f 100%); background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#f7511e), color-stop(55%,#aa1225), color-stop(100%,#9f031f)); background: -webkit-linear-gradient(25deg, #f7511e 0%,#aa1225 55%,#9f031f 100%); @@ -37,19 +37,19 @@ body{ background: -ms-linear-gradient(25deg, #f7511e 0%,#aa1225 55%,#9f031f 100%); /*background: linear-gradient(25deg, #f7511e 0%,#aa1225 55%,#9f031f 100%);*/ - color: #fff; - font-family: 'Open Sans'; - margin: 0 0 200px 0; + color: #fff; + font-family: 'Open Sans'; + margin: 0 0 200px 0; } #instructions{ - padding: 0 30px 10px; - width: calc(100% - 60px); + padding: 0 30px 10px; + width: calc(100% - 60px); } #instructions p{ - font-size: 0.875em; - margin: 15px 0; + font-size: 0.875em; + margin: 15px 0; } #logo { @@ -59,8 +59,8 @@ body{ } #logo img{ - max-width: 400px; - width: 100%; + max-width: 400px; + width: 100%; } #logo p{ @@ -73,44 +73,44 @@ body{ } h2{ - color: #ffd988; - font-family: 'Nunito'; - font-size: 1.25em; - font-weight: normal; + color: #ffd988; + font-family: 'Nunito'; + font-size: 1.25em; + font-weight: normal; } .steps{ - display: table; - width: 100%; + display: table; + width: 100%; } .step{ - display: table-row; + display: table-row; } .step-number, .step-instruction{ - border-bottom: 1px solid #A0BC76; - display: table-cell; - vertical-align: top; + border-bottom: 1px solid #A0BC76; + display: table-cell; + vertical-align: top; } .step-number{ - width: 80px; + width: 80px; } .step-number img{ - display: block; - height: 30px; - margin: 15px auto; - width: 30px; - -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2)); - filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2)); + display: block; + height: 30px; + margin: 15px auto; + width: 30px; + -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2)); + filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2)); } .step-number span { display: block; height: 30px; - line-height: 30px; + line-height: 25px; margin: 15px auto; width: 30px; -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.2)); @@ -123,39 +123,56 @@ h2{ color: white; text-align: center; font-family: 'Nunito'; - font-size: 1.5em; + font-size: 1.0em; font-weight: bold; } .steps.use .step-number, .steps.use .step-instruction{ - border-bottom: 0 none; + border-bottom: 0 none; } .step-instruction{ - margin-top: 10px; + margin-top: 10px; } -.step-instruction img{ - -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); - filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); - height: 30px; - margin-right: 5px; - vertical-align: top; - width: 30px; - opacity: 0.25; +.step-instruction span{ + display: inline-block; + -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); + filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); + height: 30px; + margin-right: 5px; + vertical-align: top; + width: 30px; } .step-instruction input[type="button"]{ - background-color: #DDDDDD; - border: 0 none; - border-radius: 5px; - color: #333; - -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); - filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); - height: 30px; - line-height: 30px; - text-transform: uppercase; - width: 150px; + background-color: #DDDDDD; + border: 0 none; + border-radius: 5px; + color: #333; + -webkit-filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); + filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.1)); + height: 30px; + line-height: 30px; + width: 150px; +} + +.checkIconOff { + alt: 'CheckBoxOff'; + background: url('check-off.png'); + background-size: contain; + opacity: 0; +} + +.checkIconOn { + alt: 'CheckBoxOn'; + background: url('check-on.png'); + background-size: contain; + opacity: 1.0; +} + +#button2:disabled { + opacity: 0.25; } #supporters{ @@ -207,9 +224,9 @@ h2{ } #footer{ - background-color: #605E4B; - color: #CFCEC8; - height: 200px; + background-color: #605E4B; + color: #CFCEC8; + height: 200px; bottom: 0; left: 0; position: absolute; @@ -218,15 +235,15 @@ h2{ } #footer h2, #footer a{ - color: #CFCEC8; + color: #CFCEC8; } #footer p{ - font-size: 0.875em; - margin: 5px 0; + font-size: 0.875em; + margin: 5px 0; } #footer img{ - height: auto; - width: 50px; + height: auto; + width: 50px; } \ No newline at end of file diff --git a/oem/firstvoices/android/app/src/main/assets/setup/main.html b/oem/firstvoices/android/app/src/main/assets/setup/main.html index e57b951577..7972ba9128 100644 --- a/oem/firstvoices/android/app/src/main/assets/setup/main.html +++ b/oem/firstvoices/android/app/src/main/assets/setup/main.html @@ -1,99 +1,106 @@ - - FirstVoices Keyboards installation - - - - - + if (id == "checkbox1") { + disableButton2(); + } + } + } - + function disableButton2() { + var button2 = document.getElementById("button2"); + button2.disabled = true; + } -
- + function enableButton2() { + var button2 = document.getElementById("button2"); + button2.disabled = false; + } + + + + + +
+

Installation instructions

1
-

CheckBox

+

+

2
-

CheckBox

+ +

+

-

To use FirstVoices Keyboards

-

After completing these steps above, selected FirstVoices keyboards will be available on your Android device.

-
+

To use FirstVoices Keyboards

+

After completing these steps above, selected FirstVoices keyboards will be available on your Android device.

+
-
-

FirstVoices gratefully acknowledges the following supporters of this project:

- - - -
+
+

FirstVoices gratefully acknowledges the following supporters of this project:

+ + + +
-
-

If you like this app please consider supporting FirstVoices by donating to the First Peoples' Cultural Foundation

-

Donate

-
+
+

If you like this app please consider supporting FirstVoices by donating to the First Peoples' Cultural Foundation

+

Donate

+
- + - + \ No newline at end of file diff --git a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java index 904180db53..4e254c74a1 100644 --- a/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java +++ b/oem/firstvoices/android/app/src/main/java/com/firstvoices/keyboards/MainActivity.java @@ -10,6 +10,7 @@ import android.webkit.JavascriptInterface; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; + import androidx.appcompat.app.AppCompatActivity; import io.sentry.android.core.SentryAndroid; @@ -120,14 +121,14 @@ public class MainActivity extends AppCompatActivity { @Override public void onPageFinished(WebView view, String url) { if (didCompleteSelectKeyboard()) - view.loadUrl("javascript:setCheckBox1On();"); + view.loadUrl("javascript:setCheckBoxOn('checkbox1');"); else - view.loadUrl("javascript:setCheckBox1Off();"); + view.loadUrl("javascript:setCheckBoxOff('checkbox1');"); if (didCompleteSetup()) - view.loadUrl("javascript:setCheckBox2On();"); + view.loadUrl("javascript:setCheckBoxOn('checkbox2');"); else - view.loadUrl("javascript:setCheckBox2Off();"); + view.loadUrl("javascript:setCheckBoxOff('checkbox2');"); } }); @@ -141,14 +142,14 @@ public class MainActivity extends AppCompatActivity { WebView webView = findViewById(R.id.webView); if (webView != null) { if (didCompleteSelectKeyboard()) - webView.loadUrl("javascript:setCheckBox1On();"); + webView.loadUrl("javascript:setCheckBoxOn('checkbox1');"); else - webView.loadUrl("javascript:setCheckBox1Off();"); + webView.loadUrl("javascript:setCheckBoxOff('checkbox1');"); if (didCompleteSetup()) - webView.loadUrl("javascript:setCheckBox2On();"); + webView.loadUrl("javascript:setCheckBoxOn('checkbox2');"); else - webView.loadUrl("javascript:setCheckBox2Off();"); + webView.loadUrl("javascript:setCheckBoxOff('checkbox2');"); } } @@ -197,7 +198,7 @@ public class MainActivity extends AppCompatActivity { } } - private boolean didCompleteSelectKeyboard() { + private static boolean didCompleteSelectKeyboard() { return FVShared.getInstance().activeKeyboardCount() > 0; }