From a38ac4af6dfd9123670123f695048add7be53eee Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sat, 18 Sep 2021 00:14:49 -0500 Subject: ETBSA rebranding and non-visual tweaks --- app/src/main/AndroidManifest.xml | 4 +++- app/src/main/ic_launcher-playstore.png | Bin 0 -> 18926 bytes .../main/java/org/traccar/manager/MainActivity.kt | 8 ++++---- .../main/res/drawable/ic_launcher_foreground.xml | 22 +++++++++++++++++++++ app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 4 ++-- .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 4 ++-- app/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 4358 -> 0 bytes app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 3950 bytes app/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2670 -> 0 bytes app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2392 bytes app/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 6130 -> 0 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 5618 bytes app/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 9859 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 8740 bytes app/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 13638 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 12694 bytes app/src/main/res/values/ic_launcher_background.xml | 4 ++++ app/src/main/res/values/strings.xml | 3 ++- 18 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 app/src/main/ic_launcher-playstore.png create mode 100644 app/src/main/res/drawable/ic_launcher_foreground.xml delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/src/main/res/values/ic_launcher_background.xml (limited to 'app/src') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7931b2b..c3177f4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ package="org.traccar.manager"> + + android:configChanges="keyboardHidden|orientation|screenSize" + android:exported="true"> diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..dba61fd Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/org/traccar/manager/MainActivity.kt b/app/src/main/java/org/traccar/manager/MainActivity.kt index 945b108..ce56296 100644 --- a/app/src/main/java/org/traccar/manager/MainActivity.kt +++ b/app/src/main/java/org/traccar/manager/MainActivity.kt @@ -33,11 +33,11 @@ class MainActivity : AppCompatActivity() { } private fun initContent() { - if (PreferenceManager.getDefaultSharedPreferences(this).contains(PREFERENCE_URL)) { - fragmentManager.beginTransaction().add(android.R.id.content, MainFragment()).commit() - } else { - fragmentManager.beginTransaction().add(android.R.id.content, StartFragment()).commit() + if (!PreferenceManager.getDefaultSharedPreferences(this).contains(PREFERENCE_URL)) { + PreferenceManager.getDefaultSharedPreferences(this) + .edit().putString(PREFERENCE_URL, getString(R.string.server_url)).apply() } + fragmentManager.beginTransaction().add(android.R.id.content, MainFragment()).commit() } @RequiresApi(api = Build.VERSION_CODES.M) diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..ff2f44a --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7335274..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7335274..7353dbd 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index de3d20d..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..a17aa21 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 89d4668..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..e9c7fbd Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 21c0b1c..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..5075812 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index f9301a8..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..a294a0e Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 9903608..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..c581a2e Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..276c9ab --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #EFDB1E + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index feea781..e13d3f4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,6 @@ - Traccar Manager + ETBSA + https://etbsa.net Server This screen will be shown only once. After you click the button, server address will be saved in preferences. To change it, clear app data from application manager. Start -- cgit v1.2.3