Browse Source

Added version number to settings.

housekeeping/remove-warnings
Antoine POPINEAU 5 years ago
parent
commit
d9b7ed5b3f
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 5
      app/src/main/java/com/github/apognu/otter/activities/SettingsActivity.kt
  2. 4
      app/src/main/res/xml/settings.xml

5
app/src/main/java/com/github/apognu/otter/activities/SettingsActivity.kt

@ -10,6 +10,7 @@ import androidx.preference.ListPreference @@ -10,6 +10,7 @@ import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SeekBarPreference
import com.github.apognu.otter.BuildConfig
import com.github.apognu.otter.R
import com.github.apognu.otter.utils.AppContext
import com.github.apognu.otter.utils.Command
@ -129,6 +130,10 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP @@ -129,6 +130,10 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
preferenceManager.findPreference<SeekBarPreference>("media_cache_size")?.let {
it.summary = getString(R.string.settings_media_cache_size_summary, it.value)
}
preferenceManager.findPreference<Preference>("version")?.let {
it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
}
}
}
}

4
app/src/main/res/xml/settings.xml

@ -66,6 +66,10 @@ @@ -66,6 +66,10 @@
android:key="oss_licences"
android:title="@string/title_oss_licences" />
<Preference
android:key="version"
android:title="Version" />
</PreferenceCategory>
</androidx.preference.PreferenceScreen>
Loading…
Cancel
Save