Skip to content

Commit

Permalink
fix Android 15 layout problems; also modernize Material Design
Browse files Browse the repository at this point in the history
  • Loading branch information
sal0max committed Dec 7, 2024
1 parent 419a8a8 commit 702e13c
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 25 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/bg_display.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/colorDisplayOverlay" />
<corners android:radius="16dp" />
</shape>
1 change: 1 addition & 0 deletions app/src/main/res/layout-land/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:fitsSystemWindows="true"
android:orientation="horizontal">

<include
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout-land/activity_timeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:fitsSystemWindows="true"
android:orientation="horizontal">

<include
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:fitsSystemWindows="true"
android:orientation="vertical">

<include
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_timeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:fitsSystemWindows="true"
android:orientation="vertical">

<include
Expand Down
16 changes: 3 additions & 13 deletions app/src/main/res/layout/main_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorDisplayOverlay">
android:background="@drawable/bg_display">

<!-- guideline **************************************************** -->

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -140,17 +141,6 @@
tools:text="$ 13.99" />
</HorizontalScrollView>

<!-- divider ****************************************************** -->

<View
android:layout_width="0dp"
android:layout_height=".75dp"
android:background="?android:attr/listDivider"
app:layout_constraintBottom_toBottomOf="@id/guideline_display"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/guideline_display" />

<!-- bottom main_display ****************************************** -->

<de.salomax.currencies.view.main.spinner.SearchableSpinner
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/main_keypad.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:elevation="@dimen/elevation1x">
android:background="?android:attr/colorBackground">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/main_keypad_extended.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:elevation="@dimen/elevation1x">
android:background="?android:attr/colorBackground">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/timeline_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorDisplayOverlay">
android:background="@drawable/bg_display">

<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/refreshIndicator"
Expand Down Expand Up @@ -59,7 +59,8 @@
style="@style/TextAppearance.MaterialComponents.Subtitle1"
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"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/timeline_secondary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:elevation="@dimen/elevation1x">
android:background="?android:attr/colorBackground">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-de/changelog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="changelog_1.22.5">
<item>Layoutprobleme auf Geräten mit Android 15 behoben.</item>
<item>Ein Problem behoben, wegen dem die Navigations-Buttons bei älteren Android-Versionen versteckt waren.</item>
<item>Kleine Design-Verbesserungen.</item>
</string-array>

<string-array name="changelog_1.22.4">
<item>Aktualisierte Übersetzungen.</item>
</string-array>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-v27/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<style name="AppTheme" parent="BaseAppTheme">
<!-- "transparent" navigation bar -->
<item name="android:navigationBarColor">?android:attr/colorBackground</item>
<item name="android:windowLightNavigationBar">?android:attr/isLightTheme</item>
<item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
</style>

<style name="AppTheme.Black" parent="BaseAppTheme.PureBlack">
<!-- "transparent" navigation bar -->
<item name="android:navigationBarColor">?android:attr/colorBackground</item>
<item name="android:windowLightNavigationBar">?android:attr/isLightTheme</item>
<item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
</style>

</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/values/changelog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="changelog_1.22.5">
<item>Fixed layout issues on Android 15 devices.</item>
<item>Fixed an issue where the navigation buttons were hidden on older Android versions.</item>
<item>Minor design improvements.</item>
</string-array>

<string-array name="changelog_1.22.4">
<item>Updated translations.</item>
</string-array>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<!-- make actionbar the same color as the background -->
<style name="AppTheme.ActionBar" parent="Widget.Material3.Light.ActionBar.Solid">
<item name="background">?attr/colorBackground</item>
<item name="elevation">0dp</item>
</style>

<!-- more traditional switch style -->
Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/de/changelogs/12205.txt
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/12205.txt
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 702e13c

Please sign in to comment.