mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2025-02-21 19:44:45 +01:00
Add language change settings (#577)
This commit is contained in:
parent
323bc188b1
commit
38370d647d
@ -164,6 +164,7 @@ dependencies {
|
|||||||
implementation "eu.davidea:flexible-adapter-ui:1.0.0"
|
implementation "eu.davidea:flexible-adapter-ui:1.0.0"
|
||||||
implementation "com.aurelhubert:ahbottomnavigation:2.3.4"
|
implementation "com.aurelhubert:ahbottomnavigation:2.3.4"
|
||||||
implementation "com.ncapdevi:frag-nav:3.3.0"
|
implementation "com.ncapdevi:frag-nav:3.3.0"
|
||||||
|
implementation "com.github.YarikSOffice:lingver:1.1.0"
|
||||||
|
|
||||||
implementation "com.github.pwittchen:reactivenetwork-rx2:3.0.6"
|
implementation "com.github.pwittchen:reactivenetwork-rx2:3.0.6"
|
||||||
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
|
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
|
||||||
|
@ -6,6 +6,7 @@ import android.util.Log.VERBOSE
|
|||||||
import androidx.multidex.MultiDex
|
import androidx.multidex.MultiDex
|
||||||
import androidx.work.Configuration
|
import androidx.work.Configuration
|
||||||
import com.jakewharton.threetenabp.AndroidThreeTen
|
import com.jakewharton.threetenabp.AndroidThreeTen
|
||||||
|
import com.yariksoffice.lingver.Lingver
|
||||||
import dagger.android.AndroidInjector
|
import dagger.android.AndroidInjector
|
||||||
import dagger.android.support.DaggerApplication
|
import dagger.android.support.DaggerApplication
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
@ -44,6 +45,7 @@ class WulkanowyApp : DaggerApplication(), Configuration.Provider {
|
|||||||
super.onCreate()
|
super.onCreate()
|
||||||
AndroidThreeTen.init(this)
|
AndroidThreeTen.init(this)
|
||||||
RxJavaPlugins.setErrorHandler(::onError)
|
RxJavaPlugins.setErrorHandler(::onError)
|
||||||
|
Lingver.init(this)
|
||||||
themeManager.applyDefaultTheme()
|
themeManager.applyDefaultTheme()
|
||||||
|
|
||||||
initLogging()
|
initLogging()
|
||||||
|
@ -33,6 +33,10 @@ class PreferencesRepository @Inject constructor(
|
|||||||
val gradeColorTheme: String
|
val gradeColorTheme: String
|
||||||
get() = getString(R.string.pref_key_grade_color_scheme, R.string.pref_default_grade_color_scheme)
|
get() = getString(R.string.pref_key_grade_color_scheme, R.string.pref_default_grade_color_scheme)
|
||||||
|
|
||||||
|
val appLanguageKey = context.getString(R.string.pref_key_app_language)
|
||||||
|
val appLanguage
|
||||||
|
get() = getString(appLanguageKey, R.string.pref_default_app_language)
|
||||||
|
|
||||||
val serviceEnableKey = context.getString(R.string.pref_key_services_enable)
|
val serviceEnableKey = context.getString(R.string.pref_key_services_enable)
|
||||||
val isServiceEnabled: Boolean
|
val isServiceEnabled: Boolean
|
||||||
get() = getBoolean(serviceEnableKey, R.bool.pref_default_services_enable)
|
get() = getBoolean(serviceEnableKey, R.bool.pref_default_services_enable)
|
||||||
|
@ -2,6 +2,7 @@ package io.github.wulkanowy.di
|
|||||||
|
|
||||||
import android.appwidget.AppWidgetManager
|
import android.appwidget.AppWidgetManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import com.yariksoffice.lingver.Lingver
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||||
@ -32,4 +33,8 @@ internal class AppModule {
|
|||||||
@Singleton
|
@Singleton
|
||||||
@Provides
|
@Provides
|
||||||
fun provideAppInfo() = AppInfo()
|
fun provideAppInfo() = AppInfo()
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
@Provides
|
||||||
|
fun provideLingver() = Lingver.getInstance()
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import io.github.wulkanowy.ui.base.BaseFragment
|
|||||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.hideSoftInput
|
import io.github.wulkanowy.utils.hideSoftInput
|
||||||
import io.github.wulkanowy.utils.openEmail
|
import io.github.wulkanowy.utils.openEmailClient
|
||||||
import io.github.wulkanowy.utils.openInternetBrowser
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import io.github.wulkanowy.utils.showSoftInput
|
import io.github.wulkanowy.utils.showSoftInput
|
||||||
import kotlinx.android.synthetic.main.fragment_login_form.*
|
import kotlinx.android.synthetic.main.fragment_login_form.*
|
||||||
@ -166,7 +166,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun openEmail() {
|
override fun openEmail() {
|
||||||
context?.openEmail(
|
context?.openEmailClient(
|
||||||
requireContext().getString(R.string.login_email_intent_title),
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
"wulkanowyinc@gmail.com",
|
"wulkanowyinc@gmail.com",
|
||||||
requireContext().getString(R.string.login_email_subject),
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
@ -14,7 +14,7 @@ import io.github.wulkanowy.data.db.entities.Student
|
|||||||
import io.github.wulkanowy.ui.base.BaseFragment
|
import io.github.wulkanowy.ui.base.BaseFragment
|
||||||
import io.github.wulkanowy.ui.modules.main.MainActivity
|
import io.github.wulkanowy.ui.modules.main.MainActivity
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.openEmail
|
import io.github.wulkanowy.utils.openEmailClient
|
||||||
import io.github.wulkanowy.utils.openInternetBrowser
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import io.github.wulkanowy.utils.setOnItemClickListener
|
import io.github.wulkanowy.utils.setOnItemClickListener
|
||||||
import kotlinx.android.synthetic.main.fragment_login_student_select.*
|
import kotlinx.android.synthetic.main.fragment_login_student_select.*
|
||||||
@ -102,7 +102,7 @@ class LoginStudentSelectFragment : BaseFragment(), LoginStudentSelectView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun openEmail() {
|
override fun openEmail() {
|
||||||
context?.openEmail(
|
context?.openEmailClient(
|
||||||
requireContext().getString(R.string.login_email_intent_title),
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
"wulkanowyinc@gmail.com",
|
"wulkanowyinc@gmail.com",
|
||||||
requireContext().getString(R.string.login_email_subject),
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
@ -16,7 +16,7 @@ import io.github.wulkanowy.ui.base.BaseFragment
|
|||||||
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
import io.github.wulkanowy.ui.modules.login.LoginActivity
|
||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.hideSoftInput
|
import io.github.wulkanowy.utils.hideSoftInput
|
||||||
import io.github.wulkanowy.utils.openEmail
|
import io.github.wulkanowy.utils.openEmailClient
|
||||||
import io.github.wulkanowy.utils.openInternetBrowser
|
import io.github.wulkanowy.utils.openInternetBrowser
|
||||||
import io.github.wulkanowy.utils.showSoftInput
|
import io.github.wulkanowy.utils.showSoftInput
|
||||||
import kotlinx.android.synthetic.main.fragment_login_symbol.*
|
import kotlinx.android.synthetic.main.fragment_login_symbol.*
|
||||||
@ -131,7 +131,7 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun openEmail() {
|
override fun openEmail() {
|
||||||
context?.openEmail(
|
context?.openEmailClient(
|
||||||
requireContext().getString(R.string.login_email_intent_title),
|
requireContext().getString(R.string.login_email_intent_title),
|
||||||
"wulkanowyinc@gmail.com",
|
"wulkanowyinc@gmail.com",
|
||||||
requireContext().getString(R.string.login_email_subject),
|
requireContext().getString(R.string.login_email_subject),
|
||||||
|
@ -10,8 +10,8 @@ import io.github.wulkanowy.ui.base.BaseFragment
|
|||||||
import io.github.wulkanowy.ui.modules.main.MainView
|
import io.github.wulkanowy.ui.modules.main.MainView
|
||||||
import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersChildView
|
import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersChildView
|
||||||
import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersFragment
|
import io.github.wulkanowy.ui.modules.schoolandteachers.SchoolAndTeachersFragment
|
||||||
import io.github.wulkanowy.utils.dialPhone
|
import io.github.wulkanowy.utils.openDialer
|
||||||
import io.github.wulkanowy.utils.openMapLocation
|
import io.github.wulkanowy.utils.openNavigation
|
||||||
import kotlinx.android.synthetic.main.fragment_school.*
|
import kotlinx.android.synthetic.main.fragment_school.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@ -86,10 +86,10 @@ class SchoolFragment : BaseFragment(), SchoolView, MainView.TitledView, SchoolAn
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun openMapsLocation(location: String) {
|
override fun openMapsLocation(location: String) {
|
||||||
context?.openMapLocation(location)
|
context?.openNavigation(location)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dialPhone(phone: String) {
|
override fun dialPhone(phone: String) {
|
||||||
context?.dialPhone(phone)
|
context?.openDialer(phone)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import android.content.SharedPreferences
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
|
import com.yariksoffice.lingver.Lingver
|
||||||
import dagger.android.support.AndroidSupportInjection
|
import dagger.android.support.AndroidSupportInjection
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
import io.github.wulkanowy.ui.base.BaseActivity
|
import io.github.wulkanowy.ui.base.BaseActivity
|
||||||
@ -12,7 +13,8 @@ import io.github.wulkanowy.ui.modules.main.MainView
|
|||||||
import io.github.wulkanowy.utils.AppInfo
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedPreferenceChangeListener,
|
class SettingsFragment : PreferenceFragmentCompat(),
|
||||||
|
SharedPreferences.OnSharedPreferenceChangeListener,
|
||||||
MainView.TitledView, SettingsView {
|
MainView.TitledView, SettingsView {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@ -21,6 +23,9 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
|||||||
@Inject
|
@Inject
|
||||||
lateinit var appInfo: AppInfo
|
lateinit var appInfo: AppInfo
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
lateinit var lingver: Lingver
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance() = SettingsFragment()
|
fun newInstance() = SettingsFragment()
|
||||||
}
|
}
|
||||||
@ -50,6 +55,10 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP
|
|||||||
activity?.recreate()
|
activity?.recreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun updateLanguage(langCode: String) {
|
||||||
|
lingver.setLocale(requireContext(), langCode)
|
||||||
|
}
|
||||||
|
|
||||||
override fun setServicesSuspended(serviceEnablesKey: String, isHolidays: Boolean) {
|
override fun setServicesSuspended(serviceEnablesKey: String, isHolidays: Boolean) {
|
||||||
findPreference<Preference>(serviceEnablesKey)?.apply {
|
findPreference<Preference>(serviceEnablesKey)?.apply {
|
||||||
summary = if (isHolidays) getString(R.string.pref_services_suspended) else ""
|
summary = if (isHolidays) getString(R.string.pref_services_suspended) else ""
|
||||||
|
@ -6,6 +6,7 @@ import io.github.wulkanowy.data.repositories.student.StudentRepository
|
|||||||
import io.github.wulkanowy.services.sync.SyncManager
|
import io.github.wulkanowy.services.sync.SyncManager
|
||||||
import io.github.wulkanowy.ui.base.BasePresenter
|
import io.github.wulkanowy.ui.base.BasePresenter
|
||||||
import io.github.wulkanowy.ui.base.ErrorHandler
|
import io.github.wulkanowy.ui.base.ErrorHandler
|
||||||
|
import io.github.wulkanowy.utils.AppInfo
|
||||||
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
import io.github.wulkanowy.utils.FirebaseAnalyticsHelper
|
||||||
import io.github.wulkanowy.utils.SchedulersProvider
|
import io.github.wulkanowy.utils.SchedulersProvider
|
||||||
import io.github.wulkanowy.utils.isHolidays
|
import io.github.wulkanowy.utils.isHolidays
|
||||||
@ -20,7 +21,8 @@ class SettingsPresenter @Inject constructor(
|
|||||||
private val preferencesRepository: PreferencesRepository,
|
private val preferencesRepository: PreferencesRepository,
|
||||||
private val analytics: FirebaseAnalyticsHelper,
|
private val analytics: FirebaseAnalyticsHelper,
|
||||||
private val syncManager: SyncManager,
|
private val syncManager: SyncManager,
|
||||||
private val chuckCollector: ChuckCollector
|
private val chuckCollector: ChuckCollector,
|
||||||
|
private val appInfo: AppInfo
|
||||||
) : BasePresenter<SettingsView>(errorHandler, studentRepository, schedulers) {
|
) : BasePresenter<SettingsView>(errorHandler, studentRepository, schedulers) {
|
||||||
|
|
||||||
override fun onAttachView(view: SettingsView) {
|
override fun onAttachView(view: SettingsView) {
|
||||||
@ -38,6 +40,10 @@ class SettingsPresenter @Inject constructor(
|
|||||||
servicesIntervalKey, servicesOnlyWifiKey -> syncManager.startSyncWorker(true)
|
servicesIntervalKey, servicesOnlyWifiKey -> syncManager.startSyncWorker(true)
|
||||||
isDebugNotificationEnableKey -> chuckCollector.showNotification(isDebugNotificationEnable)
|
isDebugNotificationEnableKey -> chuckCollector.showNotification(isDebugNotificationEnable)
|
||||||
appThemeKey -> view?.recreateView()
|
appThemeKey -> view?.recreateView()
|
||||||
|
appLanguageKey -> view?.run {
|
||||||
|
updateLanguage(if (appLanguage == "system") appInfo.systemLanguage else appLanguage)
|
||||||
|
recreateView()
|
||||||
|
}
|
||||||
else -> Unit
|
else -> Unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,7 @@ interface SettingsView : BaseView {
|
|||||||
|
|
||||||
fun recreateView()
|
fun recreateView()
|
||||||
|
|
||||||
|
fun updateLanguage(langCode: String)
|
||||||
|
|
||||||
fun setServicesSuspended(serviceEnablesKey: String, isHolidays: Boolean)
|
fun setServicesSuspended(serviceEnablesKey: String, isHolidays: Boolean)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.github.wulkanowy.utils
|
package io.github.wulkanowy.utils
|
||||||
|
|
||||||
|
import android.content.res.Resources
|
||||||
import android.os.Build.MANUFACTURER
|
import android.os.Build.MANUFACTURER
|
||||||
import android.os.Build.MODEL
|
import android.os.Build.MODEL
|
||||||
import android.os.Build.VERSION.SDK_INT
|
import android.os.Build.VERSION.SDK_INT
|
||||||
@ -25,4 +26,8 @@ open class AppInfo {
|
|||||||
open val systemManufacturer: String get() = MANUFACTURER
|
open val systemManufacturer: String get() = MANUFACTURER
|
||||||
|
|
||||||
open val systemModel: String get() = MODEL
|
open val systemModel: String get() = MODEL
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
open val systemLanguage: String
|
||||||
|
get() = Resources.getSystem().configuration.locale.language
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ fun Context.openInternetBrowser(uri: String, onActivityNotFound: (uri: String) -
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.openEmail(chooserTitle: String, email: String, subject: String?, body: String?) {
|
fun Context.openEmailClient(chooserTitle: String, email: String, subject: String?, body: String?) {
|
||||||
val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null))
|
val emailIntent = Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null))
|
||||||
emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf(email))
|
emailIntent.putExtra(Intent.EXTRA_EMAIL, arrayOf(email))
|
||||||
if (subject != null) emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject)
|
if (subject != null) emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject)
|
||||||
@ -40,7 +40,7 @@ fun Context.openEmail(chooserTitle: String, email: String, subject: String?, bod
|
|||||||
startActivity(Intent.createChooser(emailIntent, chooserTitle))
|
startActivity(Intent.createChooser(emailIntent, chooserTitle))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.openMapLocation(location: String) {
|
fun Context.openNavigation(location: String) {
|
||||||
val intentUri = Uri.parse("geo:0,0?q=${Uri.encode(location)}")
|
val intentUri = Uri.parse("geo:0,0?q=${Uri.encode(location)}")
|
||||||
val intent = Intent(Intent.ACTION_VIEW, intentUri)
|
val intent = Intent(Intent.ACTION_VIEW, intentUri)
|
||||||
if (intent.resolveActivity(packageManager) != null) {
|
if (intent.resolveActivity(packageManager) != null) {
|
||||||
@ -48,7 +48,7 @@ fun Context.openMapLocation(location: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.dialPhone(phone: String) {
|
fun Context.openDialer(phone: String) {
|
||||||
val intentUri = Uri.parse("tel:$phone")
|
val intentUri = Uri.parse("tel:$phone")
|
||||||
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
val intent = Intent(Intent.ACTION_DIAL, intentUri)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
<item>Czarny (AMOLED)</item>
|
<item>Czarny (AMOLED)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="app_language_entries">
|
||||||
|
<item>Język systemu</item>
|
||||||
|
<item>Polski</item>
|
||||||
|
<item>English</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<string-array name="grade_modifier_entries">
|
<string-array name="grade_modifier_entries">
|
||||||
<item>Domyślna</item>
|
<item>Domyślna</item>
|
||||||
<item>0,25</item>
|
<item>0,25</item>
|
||||||
|
@ -300,6 +300,7 @@
|
|||||||
<string name="pref_view_app_theme">Motyw aplikacji</string>
|
<string name="pref_view_app_theme">Motyw aplikacji</string>
|
||||||
<string name="pref_view_expand_grade">Rozwiń oceny</string>
|
<string name="pref_view_expand_grade">Rozwiń oceny</string>
|
||||||
<string name="pref_view_grade_color_scheme">Schemat kolorów ocen</string>
|
<string name="pref_view_grade_color_scheme">Schemat kolorów ocen</string>
|
||||||
|
<string name="pref_view_app_language">Język aplikacji</string>
|
||||||
|
|
||||||
<string name="pref_notify_header">Powiadomienia</string>
|
<string name="pref_notify_header">Powiadomienia</string>
|
||||||
<string name="pref_notify_switch">Pokazuj powiadomienia</string>
|
<string name="pref_notify_switch">Pokazuj powiadomienia</string>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<bool name="pref_default_expand_grade">false</bool>
|
<bool name="pref_default_expand_grade">false</bool>
|
||||||
<string name="pref_default_app_theme">light</string>
|
<string name="pref_default_app_theme">light</string>
|
||||||
<string name="pref_default_grade_color_scheme">vulcan</string>
|
<string name="pref_default_grade_color_scheme">vulcan</string>
|
||||||
|
<string name="pref_default_app_language">system</string>
|
||||||
<bool name="pref_default_services_enable">true</bool>
|
<bool name="pref_default_services_enable">true</bool>
|
||||||
<string name="pref_default_services_interval">60</string>
|
<string name="pref_default_services_interval">60</string>
|
||||||
<bool name="pref_default_services_wifi_only">false</bool>
|
<bool name="pref_default_services_wifi_only">false</bool>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<string name="pref_key_expand_grade">expand_grade</string>
|
<string name="pref_key_expand_grade">expand_grade</string>
|
||||||
<string name="pref_key_grade_average_mode">grade_average_mode</string>
|
<string name="pref_key_grade_average_mode">grade_average_mode</string>
|
||||||
<string name="pref_key_grade_average_force_calc">grade_average_always_calc</string>
|
<string name="pref_key_grade_average_force_calc">grade_average_always_calc</string>
|
||||||
|
<string name="pref_key_app_language">app_language</string>
|
||||||
<string name="pref_key_services_enable">services_enable</string>
|
<string name="pref_key_services_enable">services_enable</string>
|
||||||
<string name="pref_key_services_interval">services_interval</string>
|
<string name="pref_key_services_interval">services_interval</string>
|
||||||
<string name="pref_key_services_wifi_only">services_disable_wifi_only</string>
|
<string name="pref_key_services_wifi_only">services_disable_wifi_only</string>
|
||||||
|
@ -24,6 +24,17 @@
|
|||||||
<item>black</item>
|
<item>black</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="app_language_entries">
|
||||||
|
<item>System language</item>
|
||||||
|
<item>Polski</item>
|
||||||
|
<item>English</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="app_language_values" translatable="false">
|
||||||
|
<item>system</item>
|
||||||
|
<item>pl</item>
|
||||||
|
<item>en</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
<string-array name="services_interval_entries">
|
<string-array name="services_interval_entries">
|
||||||
<item>15 minutes</item>
|
<item>15 minutes</item>
|
||||||
<item>30 minutes</item>
|
<item>30 minutes</item>
|
||||||
|
@ -286,6 +286,7 @@
|
|||||||
<string name="pref_view_app_theme">Application theme</string>
|
<string name="pref_view_app_theme">Application theme</string>
|
||||||
<string name="pref_view_expand_grade">Expand grades</string>
|
<string name="pref_view_expand_grade">Expand grades</string>
|
||||||
<string name="pref_view_grade_color_scheme">Grades color scheme</string>
|
<string name="pref_view_grade_color_scheme">Grades color scheme</string>
|
||||||
|
<string name="pref_view_app_language">App language</string>
|
||||||
|
|
||||||
<string name="pref_notify_header">Notifications</string>
|
<string name="pref_notify_header">Notifications</string>
|
||||||
<string name="pref_notify_switch">Show notifications</string>
|
<string name="pref_notify_switch">Show notifications</string>
|
||||||
|
@ -37,6 +37,14 @@
|
|||||||
app:key="@string/pref_key_grade_color_scheme"
|
app:key="@string/pref_key_grade_color_scheme"
|
||||||
app:title="@string/pref_view_grade_color_scheme"
|
app:title="@string/pref_view_grade_color_scheme"
|
||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
<ListPreference
|
||||||
|
app:defaultValue="@string/pref_default_app_language"
|
||||||
|
app:entries="@array/app_language_entries"
|
||||||
|
app:entryValues="@array/app_language_values"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
|
app:key="@string/pref_key_app_language"
|
||||||
|
app:title="@string/pref_view_app_language"
|
||||||
|
app:useSimpleSummaryProvider="true" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
@ -106,9 +114,9 @@
|
|||||||
app:useSimpleSummaryProvider="true" />
|
app:useSimpleSummaryProvider="true" />
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
app:defaultValue="@bool/pref_default_grade_average_force_calc"
|
app:defaultValue="@bool/pref_default_grade_average_force_calc"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
app:key="@string/pref_key_grade_average_force_calc"
|
app:key="@string/pref_key_grade_average_force_calc"
|
||||||
app:title="@string/pref_view_grade_average_force_calc"
|
app:title="@string/pref_view_grade_average_force_calc" />
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
app:defaultValue="@bool/pref_default_fill_message_content"
|
app:defaultValue="@bool/pref_default_fill_message_content"
|
||||||
app:iconSpaceReserved="false"
|
app:iconSpaceReserved="false"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user