Commit eb30a5a1 authored by deregges's avatar deregges

Added version string

parent adfbdc91
......@@ -2,9 +2,11 @@ package io.ender.pathchaser.menu
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import io.ender.pathchaser.BuildConfig
import io.ender.pathchaser.R
import io.ender.pathchaser.util.Utils
import kotlinx.android.synthetic.main.credits.*
import splitties.resources.appStr
class Credits : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
......@@ -12,6 +14,8 @@ class Credits : AppCompatActivity() {
setContentView(R.layout.credits)
version.text = appStr(R.string.version, BuildConfig.VERSION_NAME)
license.loadData(
resources.openRawResource(R.raw.license).bufferedReader().readText(),
"text/plain; charset=UTF-8",
......
......@@ -23,6 +23,11 @@
android:textSize="20sp"
android:layout_marginBottom="15dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/version"/>
<WebView
android:id="@+id/license"
android:layout_width="match_parent"
......
......@@ -28,4 +28,5 @@
<string name="inputMethodTouch">Berührung</string>
<string name="inputMethodRotation">Neigung (3D)</string>
<string name="inputMethodRotation2D">Neigung (2D)</string>
<string name="version">Version: %s</string>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment