diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 93d7a541..6e3fb1bc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,6 +19,7 @@ tools:node="remove"/> ().apply { add(Release(33, R.string.release_33)) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt index 16829cca..49bb00df 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/SettingsActivity.kt @@ -7,12 +7,15 @@ import com.simplemobiletools.camera.BuildConfig import com.simplemobiletools.camera.R import com.simplemobiletools.camera.extensions.config import com.simplemobiletools.commons.dialogs.FilePickerDialog +import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.humanizePath import com.simplemobiletools.commons.extensions.updateTextColors +import com.simplemobiletools.commons.extensions.useEnglishToggled import com.simplemobiletools.commons.helpers.LICENSE_GLIDE import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN import kotlinx.android.synthetic.main.activity_settings.* import java.io.File +import java.util.* class SettingsActivity : SimpleActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -24,6 +27,7 @@ class SettingsActivity : SimpleActivity() { super.onResume() setupCustomizeColors() + setupUseEnglish() setupSavePhotosFolder() setupShowPreview() setupSound() @@ -56,6 +60,16 @@ class SettingsActivity : SimpleActivity() { } } + private fun setupUseEnglish() { + settings_use_english_holder.beVisibleIf(config.wasUseEnglishToggled || Locale.getDefault().language != "en") + settings_use_english.isChecked = config.useEnglish + settings_use_english_holder.setOnClickListener { + settings_use_english.toggle() + config.useEnglish = settings_use_english.isChecked + useEnglishToggled() + } + } + private fun setupSavePhotosFolder() { settings_save_photos.text = getLastPart(config.savePhotosFolder) settings_save_photos_holder.setOnClickListener { diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 1050ca78..1e616fba 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -30,6 +30,26 @@ + + + + + +