Skip to content
Snippets Groups Projects
Unverified Commit be171ee4 authored by harambasicluka's avatar harambasicluka Committed by GitHub
Browse files

added version to information (#139)

parent 5b34c403
No related branches found
No related tags found
No related merge requests found
@file:JvmName("FormatterInformationHelper")
package de.rki.coronawarnapp.util.formatter
import de.rki.coronawarnapp.BuildConfig
import de.rki.coronawarnapp.CoronaWarnApplication
import de.rki.coronawarnapp.R
fun formatVersion(): String {
val appContext = CoronaWarnApplication.getAppContext()
val versionName: String = BuildConfig.VERSION_NAME
return appContext.getString(R.string.information_version).format(versionName)
}
......@@ -2,6 +2,12 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="de.rki.coronawarnapp.util.formatter.FormatterInformationHelper" />
</data>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -94,6 +100,17 @@
app:layout_constraintTop_toBottomOf="@+id/information_technical"
app:title="@{@string/information_legal_title}" />
<TextView
android:id="@+id/information_version"
style="@style/textMultiline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:text="@{FormatterInformationHelper.formatVersion()}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/information_legal" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_top"
android:layout_width="wrap_content"
......
......@@ -315,6 +315,7 @@
###################################### -->
<!-- XHED: Page title for menu information page -->
<string name="information_title">App-Informationen</string> <!-- final -->
<string name="information_version">Version: %1s</string>
<!-- XHED: Page title for about information page, also menu item / button text -->
<string name="information_about_title">Über die App</string> <!-- final -->
<!-- XHED: Subtitle for about information page -->
......@@ -526,5 +527,4 @@
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
......@@ -22,4 +22,4 @@ class SubmissionServiceTest {
nullValue()
)
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment