Browse Source

Merge pull request #605 from bwitt/about-version

Add version in about screen
pull/621/head
Eric Kok 3 years ago committed by GitHub
parent
commit
fc3c976e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/build.gradle
  2. 10
      app/src/main/res/layout/dialog_about.xml

3
app/build.gradle

@ -39,11 +39,14 @@ android {
debug { debug {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
versionNameSuffix '.debug'
resValue 'string', 'app_version', "${defaultConfig.versionName}${versionNameSuffix} (${defaultConfig.versionCode})"
} }
release { release {
signingConfig signingConfigs.releaseConfig signingConfig signingConfigs.releaseConfig
minifyEnabled true minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
resValue 'string', 'app_version', "${defaultConfig.versionName} (${defaultConfig.versionCode})"
} }
} }

10
app/src/main/res/layout/dialog_about.xml

@ -41,6 +41,16 @@
android:textSize="36sp" android:textSize="36sp"
app:fontFamily="sans-serif-condensed" /> app:fontFamily="sans-serif-condensed" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:text="@string/app_version"
android:textColor="@android:color/white"
android:textSize="18sp"
app:fontFamily="sans-serif-condensed" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

Loading…
Cancel
Save