Skip to content

Commit

Permalink
Add version
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyHerbron committed Apr 23, 2018
1 parent 5e28d86 commit b40bd8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 23
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionName "0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.hardware.fingerprint.FingerprintManager;
Expand All @@ -19,8 +20,10 @@
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.preference.RingtonePreference;
import android.preference.SwitchPreference;
import android.provider.Settings;
import android.security.keystore.KeyGenParameterSpec;
import android.security.keystore.KeyPermanentlyInvalidatedException;
import android.security.keystore.KeyProperties;
Expand All @@ -31,6 +34,7 @@
import android.view.MenuItem;
import android.view.View;

import com.nauk.coinfolio.BuildConfig;
import com.nauk.coinfolio.DataManagers.PreferencesManager;
import com.nauk.coinfolio.FingerprintToolkit.FingerprintDialogFragment;
import com.nauk.coinfolio.FingerprintToolkit.FingerprintHandler;
Expand Down Expand Up @@ -232,6 +236,8 @@ public boolean onPreferenceClick(Preference preference) {
}
});

((PreferenceScreen) findPreference("version")).setSummary(BuildConfig.VERSION_NAME);

bindPreferenceSummaryToValue(findPreference("default_currency"));
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/xml/pref_general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
android:positiveButtonText="@null"
android:title="@string/pref_title_default_currency" />

<PreferenceScreen android:title="Version"
android:key="version"/>

<!-- NOTE: EditTextPreference accepts EditText attributes. -->
<!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
Expand Down

0 comments on commit b40bd8f

Please sign in to comment.