Added build date to about dialog.
This commit is contained in:
parent
eb1b17a71e
commit
5871e195dc
3 changed files with 5 additions and 2 deletions
|
@ -12,6 +12,7 @@ android {
|
|||
targetSdkVersion 25
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
|
@ -55,6 +55,7 @@ import java.io.FileNotFoundException
|
|||
import java.io.InputStreamReader
|
||||
import java.io.ObjectInputStream
|
||||
import java.io.ObjectOutputStream
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@RuntimePermissions
|
||||
|
@ -283,7 +284,8 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
|
|||
R.id.action_about -> {
|
||||
val alert = alert {
|
||||
title(R.string.app_name)
|
||||
message(fromHtml(getString(R.string.about_message, BuildConfig.VERSION_NAME)))
|
||||
message(fromHtml(getString(R.string.about_message, BuildConfig.VERSION_NAME,
|
||||
SimpleDateFormat("yyyy-MM-dd", Locale.US).format(Date(BuildConfig.TIMESTAMP)))))
|
||||
icon(R.mipmap.ic_launcher)
|
||||
okButton {}
|
||||
}.show()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<resources xmlns:xliff="http://schemas.android.com/tools">
|
||||
<string name="about_message"><p><b>Version <xliff:g id="type">%1$s</xliff:g></b></p><p>Developed by <a href=\"http://erik.thauvin.net/\"><b>Erik C. Thauvin</b></a>. See all my apps <a href=\"http://mobile.thauvin.net/android/\"><b>here</b></a>.</p><a href=\"http://thauv.in/TESRemote\"><b>thauv.in/TESRemote</b></a></string>
|
||||
<string name="about_message"><p><b>Version <xliff:g id="type">%1$s</xliff:g></b> <small>(<xliff:g id="date">%2$s</xliff:g>)</small></p><p>Developed by <a href=\"http://erik.thauvin.net/\"><b>Erik C. Thauvin</b></a>. See all my apps <a href=\"http://mobile.thauvin.net/android/\"><b>here</b></a>.</p><a href=\"http://thauv.in/TESRemote\"><b>thauv.in/TESRemote</b></a></string>
|
||||
<string name="action_about">About</string>
|
||||
<string name="action_config">Configurations</string>
|
||||
<string name="alert_config_error">Configuration Errors</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue