Skip to content

Commit

Permalink
Updating Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Ixam97 committed Apr 28, 2024
1 parent 36c5ccf commit 42ac2c6
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 66 deletions.
10 changes: 9 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# Changelog [DE]:

## 0.26.2
- Verbesserung der Diagramm-Steuerelemente in der Tripzusammenfassung
- Defektes Layout nach Polestar OTA P3.0.3 behoben
- Einige Layoutprobleme im Volvo Infotainment wurden behoben

## 0.26.1
- Fix für Android 12

## 0.26.0
- Experimentelles Farbschema hinzugefügt.
- Vereinfachte Auswahl der Sekundärachse.
- Der Datenbankupload wurde in Abschnitte unterteilt, um falsche Fehlermedungen zu vermeiden und den Fortschritt anzeigen zu können.

## 0.25.2 ()
## 0.25.2
- Erweiterung der Webhook-API.
- Option für eine Handy-Erinnerung beim verlassen des Fahrzeugs hinzugefügt.
- Optimierungen bei der Lade- und Rendergeschwindigkeit der Statistikdiagramme.
Expand Down
4 changes: 2 additions & 2 deletions automotive/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
minSdkVersion 29
targetSdkVersion 33
versionCode 216
versionName "0.26.2.0001"
versionCode 217
versionName "0.26.2.0002"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
110 changes: 50 additions & 60 deletions automotive/src/main/java/com/ixam97/carStatsViewer/CarStatsViewer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.Typeface
import android.graphics.fonts.SystemFonts
import android.os.Bundle
import android.util.TypedValue
import android.view.LayoutInflater
Expand All @@ -21,7 +20,6 @@ import com.ixam97.carStatsViewer.database.tripData.*
import com.ixam97.carStatsViewer.liveDataApi.LiveDataApi
import com.ixam97.carStatsViewer.liveDataApi.abrpLiveData.AbrpLiveData
import com.ixam97.carStatsViewer.liveDataApi.http.HttpLiveData
import com.ixam97.carStatsViewer.ui.plot.graphics.PlotPaint
import com.ixam97.carStatsViewer.ui.views.MultiButtonWidget
import com.ixam97.carStatsViewer.utils.InAppLogger
import com.ixam97.carStatsViewer.utils.ScreenshotButton
Expand Down Expand Up @@ -115,70 +113,62 @@ class CarStatsViewer : Application() {
setPositiveButton(context.getString(R.string.dialog_close)) { dialog, _ ->
dialog.cancel()
}
// setTitle(context.getString(R.string.main_changelog_dialog_title, BuildConfig.VERSION_NAME.dropLast(5)))

val layout = LayoutInflater.from(context).inflate(R.layout.dialog_changelog, null)

val changelog5Title = layout.findViewById<TextView>(R.id.changes_0_26_1_title)
val changelog5TextView = layout.findViewById<TextView>(R.id.changes_0_26_1)
val changelog4Title = layout.findViewById<TextView>(R.id.changes_0_26_0_title)
val changelog4TextView = layout.findViewById<TextView>(R.id.changes_0_26_0)
val changelog3Title = layout.findViewById<TextView>(R.id.changes_0_25_2_title)
val changelog3TextView = layout.findViewById<TextView>(R.id.changes_0_25_2)
val changelog2Title = layout.findViewById<TextView>(R.id.changes_0_25_1_title)
val changelog2TextView = layout.findViewById<TextView>(R.id.changes_0_25_1)
val changelog1Title = layout.findViewById<TextView>(R.id.changes_0_25_0_title)
val changelog1TextView = layout.findViewById<TextView>(R.id.changes_0_25_0)

changelog5Title.text = context.getString(R.string.main_changelog_dialog_title, "0.26.1")
changelog4Title.text = context.getString(R.string.main_changelog_dialog_title, "0.26.0")
changelog3Title.text = context.getString(R.string.main_changelog_dialog_title, "0.25.2")
changelog2Title.text = context.getString(R.string.main_changelog_dialog_title, "0.25.1")
changelog1Title.text = context.getString(R.string.main_changelog_dialog_title, "0.25.0")

val changesArray5 = context.resources.getStringArray(R.array.changes_0_26_1)
var changelog5 = ""
changesArray5.forEachIndexed { index, change ->
changelog5 += "$change"
if (index < changesArray5.size - 1) changelog5 += "\n\n"
}

val changesArray4 = context.resources.getStringArray(R.array.changes_0_26_0)
var changelog4 = ""
changesArray4.forEachIndexed { index, change ->
changelog4 += "$change"
if (index < changesArray4.size - 1) changelog4 += "\n\n"
}

val changesArray3 = context.resources.getStringArray(R.array.changes_0_25_2)
var changelog3 = ""
changesArray3.forEachIndexed { index, change ->
changelog3 += "$change"
if (index < changesArray3.size - 1) changelog3 += "\n\n"
}

val changesArray2 = context.resources.getStringArray(R.array.changes_0_25_1)
var changelog2 = ""
changesArray2.forEachIndexed { index, change ->
changelog2 += "$change"
if (index < changesArray2.size - 1) changelog2 += "\n\n"
}

val changesArray1 = context.resources.getStringArray(R.array.changes_0_25_0)
var changelog1 = ""
changesArray1.forEachIndexed { index, change ->
changelog1 += "$change"
if (index < changesArray1.size - 1) changelog1 += "\n\n"
fun applyChangelogVersion(
versionString: String,
changesArrayResId: Int,
titleViewResId: Int,
textViewResId: Int,
) {
val changesArray = context.resources.getStringArray(changesArrayResId)
var changelog = ""
changesArray.forEachIndexed { index, change ->
changelog += "$change"
if (index < changesArray.size - 1) changelog += "\n\n"
}
layout.findViewById<TextView>(titleViewResId).text = context.getString(R.string.main_changelog_dialog_title, versionString)
layout.findViewById<TextView>(textViewResId).text = changelog
}

changelog5TextView.text = changelog5
changelog4TextView.text = changelog4
changelog3TextView.text = changelog3
changelog2TextView.text = changelog2
changelog1TextView.text = changelog1
applyChangelogVersion(
versionString = "0.26.2",
titleViewResId = R.id.changes_0_26_2_title,
textViewResId = R.id.changes_0_26_2,
changesArrayResId = R.array.changes_0_26_2
)
applyChangelogVersion(
versionString = "0.26.1",
titleViewResId = R.id.changes_0_26_1_title,
textViewResId = R.id.changes_0_26_1,
changesArrayResId = R.array.changes_0_26_1
)
applyChangelogVersion(
versionString = "0.26.0",
titleViewResId = R.id.changes_0_26_0_title,
textViewResId = R.id.changes_0_26_0,
changesArrayResId = R.array.changes_0_26_0
)
applyChangelogVersion(
versionString = "0.25.2",
titleViewResId = R.id.changes_0_25_2_title,
textViewResId = R.id.changes_0_25_2,
changesArrayResId = R.array.changes_0_25_2
)
applyChangelogVersion(
versionString = "0.25.1",
titleViewResId = R.id.changes_0_25_1_title,
textViewResId = R.id.changes_0_25_1,
changesArrayResId = R.array.changes_0_25_1
)
applyChangelogVersion(
versionString = "0.25.0",
titleViewResId = R.id.changes_0_25_0_title,
textViewResId = R.id.changes_0_25_0,
changesArrayResId = R.array.changes_0_25_0
)

applyTypeface(layout)

setView(layout)

setCancelable(true)
Expand Down
17 changes: 16 additions & 1 deletion automotive/src/main/res/layout/dialog_changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,24 @@
android:layout_marginHorizontal="25dp"
android:paddingBottom="50dp"
android:orientation="vertical">
<TextView
android:id="@+id/changes_0_26_2_title"
android:text="0.26.2:"
style="@style/title_text_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"/>
<View style="@style/dialog_divider_bar" />
<TextView
style="@style/menu_row_top_text"
android:id="@+id/changes_0_26_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp"/>
<View style="@style/menu_divider_style"/>
<TextView
android:id="@+id/changes_0_26_1_title"
android:text="0.25.0:"
android:text="0.26.1:"
style="@style/title_text_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
9 changes: 9 additions & 0 deletions automotive/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="changes_0_26_2">
<item>Verbesserung der Diagramm-Steuerelemente in der Tripzusammenfassung</item>
<item>Defektes Layout nach Polestar OTA P3.0.3 behoben</item>
<item>Einige Layoutprobleme im Volvo Infotainment wurden behoben</item>
</string-array>

<string-array name="changes_0_26_1">
<item>Fix für Android 12 (P3.0)</item>
</string-array>

<string-array name="changes_0_26_0">
<item>Experimentelles Farbschema hinzugefügt.</item>
Expand Down
6 changes: 6 additions & 0 deletions automotive/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
<item>Ricardo Blauth</item>
<item>Marcelo Fornereto</item>
</string-array>

<string-array name="changes_0_26_2">
<item>Tweaked summary plot controls</item>
<item>Fixed broken layout after Polestar OTA P3.0.3</item>
<item>Fixed some layout issues on Volvo Infotainment</item>
</string-array>
<string-array name="changes_0_26_1">
<item>Fix for Android 12 (P3.0)</item>
</string-array>
Expand Down
5 changes: 3 additions & 2 deletions automotive/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@
<item name="android:textSize">@dimen/std_font_size</item>
</style>
<style name="dialog_divider_bar">
<item name="android:layout_height">0dp</item>
<item name="android:layout_height">20dp</item>
<item name="android:layout_width">0dp</item>
<item name="android:visibility">gone</item>
<item name="android:visibility">visible</item>
<item name="android:background">@android:color/transparent</item>
</style>
<style name="AppTheme.action_bar_line">
<!--<item name="android:background">@drawable/club_gradient</item>
Expand Down

0 comments on commit 42ac2c6

Please sign in to comment.