From 702e13c613f31049d65fa22bb16f501390deea8d Mon Sep 17 00:00:00 2001 From: Maximilian Salomon Date: Sat, 7 Dec 2024 15:35:27 +0100 Subject: [PATCH] fix Android 15 layout problems; also modernize Material Design --- app/build.gradle.kts | 4 ++-- .../view/preference/PreferenceFragment.kt | 6 ++++++ app/src/main/res/drawable/bg_display.xml | 5 +++++ app/src/main/res/layout-land/activity_main.xml | 1 + .../main/res/layout-land/activity_timeline.xml | 1 + app/src/main/res/layout/activity_main.xml | 1 + app/src/main/res/layout/activity_timeline.xml | 1 + app/src/main/res/layout/main_display.xml | 16 +++------------- app/src/main/res/layout/main_keypad.xml | 3 +-- app/src/main/res/layout/main_keypad_extended.xml | 3 +-- app/src/main/res/layout/timeline_chart.xml | 5 +++-- app/src/main/res/layout/timeline_secondary.xml | 3 +-- app/src/main/res/values-de/changelog.xml | 6 ++++++ app/src/main/res/values-v27/styles.xml | 4 ++-- app/src/main/res/values/changelog.xml | 6 ++++++ app/src/main/res/values/styles.xml | 1 + .../metadata/android/de/changelogs/12205.txt | 3 +++ .../metadata/android/en-US/changelogs/12205.txt | 3 +++ 18 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 app/src/main/res/drawable/bg_display.xml create mode 100644 fastlane/metadata/android/de/changelogs/12205.txt create mode 100644 fastlane/metadata/android/en-US/changelogs/12205.txt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6d98cd4c..1a312969 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -19,8 +19,8 @@ android { minSdk = 26 targetSdk = 35 // SemVer - versionName = "1.22.4" - versionCode = 12204 + versionName = "1.22.5" + versionCode = 12205 setProperty("archivesBaseName", "$applicationId-v$versionCode") } diff --git a/app/src/main/kotlin/de/salomax/currencies/view/preference/PreferenceFragment.kt b/app/src/main/kotlin/de/salomax/currencies/view/preference/PreferenceFragment.kt index d7209fec..f7dd0b89 100644 --- a/app/src/main/kotlin/de/salomax/currencies/view/preference/PreferenceFragment.kt +++ b/app/src/main/kotlin/de/salomax/currencies/view/preference/PreferenceFragment.kt @@ -4,6 +4,7 @@ import android.content.ActivityNotFoundException import android.content.Intent import android.net.Uri import android.os.Bundle +import android.view.View import androidx.lifecycle.ViewModelProvider import androidx.preference.EditTextPreference import androidx.preference.ListPreference @@ -24,6 +25,11 @@ class PreferenceFragment: PreferenceFragmentCompat() { private lateinit var viewModel: PreferenceViewModel + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + view.fitsSystemWindows = true + } + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.prefs, rootKey) viewModel = ViewModelProvider(this)[PreferenceViewModel::class.java] diff --git a/app/src/main/res/drawable/bg_display.xml b/app/src/main/res/drawable/bg_display.xml new file mode 100644 index 00000000..d0a430c3 --- /dev/null +++ b/app/src/main/res/drawable/bg_display.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 1c7480a4..de44da60 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -5,6 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:baselineAligned="false" + android:fitsSystemWindows="true" android:orientation="horizontal"> + android:background="@drawable/bg_display"> @@ -85,7 +85,8 @@ style="@style/TextAppearance.Material3.TitleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_margin="@dimen/margin1x" + android:layout_marginHorizontal="@dimen/margin2x" + android:layout_marginVertical="@dimen/margin1x" android:alpha=".5" android:gravity="end" android:textColor="?android:attr/textColorTertiary" @@ -140,17 +141,6 @@ tools:text="$ 13.99" /> - - - - + android:background="?android:attr/colorBackground"> + android:background="?android:attr/colorBackground"> + android:background="@drawable/bg_display"> + android:background="?android:attr/colorBackground"> + + Layoutprobleme auf Geräten mit Android 15 behoben. + Ein Problem behoben, wegen dem die Navigations-Buttons bei älteren Android-Versionen versteckt waren. + Kleine Design-Verbesserungen. + + Aktualisierte Übersetzungen. diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml index 86eea036..d27fec2d 100644 --- a/app/src/main/res/values-v27/styles.xml +++ b/app/src/main/res/values-v27/styles.xml @@ -4,13 +4,13 @@ diff --git a/app/src/main/res/values/changelog.xml b/app/src/main/res/values/changelog.xml index 2a437241..b17de44b 100644 --- a/app/src/main/res/values/changelog.xml +++ b/app/src/main/res/values/changelog.xml @@ -1,5 +1,11 @@ + + Fixed layout issues on Android 15 devices. + Fixed an issue where the navigation buttons were hidden on older Android versions. + Minor design improvements. + + Updated translations. diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 0b4ef6c7..16df7173 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -83,6 +83,7 @@ diff --git a/fastlane/metadata/android/de/changelogs/12205.txt b/fastlane/metadata/android/de/changelogs/12205.txt new file mode 100644 index 00000000..03c4cff8 --- /dev/null +++ b/fastlane/metadata/android/de/changelogs/12205.txt @@ -0,0 +1,3 @@ +- Layoutprobleme auf Geräten mit Android 15 behoben. +- Ein Problem behoben, wegen dem die Navigations-Buttons bei älteren Android-Versionen versteckt waren. +- Kleine Design-Verbesserungen. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/12205.txt b/fastlane/metadata/android/en-US/changelogs/12205.txt new file mode 100644 index 00000000..c972368e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/12205.txt @@ -0,0 +1,3 @@ +- Fixed layout issues on Android 15 devices. +- Fixed an issue where the navigation buttons were hidden on older Android versions. +- Minor design improvements.