From db5b553ce8b94a703f0008ed75082ca451587f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 4 Sep 2023 10:39:33 +0200 Subject: [PATCH 01/11] Add sleep timer This closes #105 --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 4 + .../activities/BrightDisplayActivity.kt | 36 ++++++- .../flashlight/activities/MainActivity.kt | 94 +++++++++++++++++-- .../dialogs/SleepTimerCustomDialog.kt | 33 +++++++ .../flashlight/helpers/Config.kt | 8 ++ .../flashlight/helpers/Constants.kt | 2 + .../flashlight/helpers/ShutDownReceiver.kt | 12 +++ .../flashlight/helpers/SleepTimer.kt | 70 ++++++++++++++ .../flashlight/models/Events.kt | 2 + .../res/layout/activity_bright_display.xml | 69 ++++++++++++++ app/src/main/res/layout/activity_main.xml | 67 +++++++++++++ .../dialog_custom_sleep_timer_picker.xml | 30 ++++++ app/src/main/res/menu/menu.xml | 4 + app/src/main/res/values-ar/strings.xml | 1 + app/src/main/res/values-az/strings.xml | 3 +- app/src/main/res/values-be/strings.xml | 3 +- app/src/main/res/values-bg/strings.xml | 3 +- app/src/main/res/values-ca/strings.xml | 3 +- app/src/main/res/values-cs/strings.xml | 3 +- app/src/main/res/values-cy/strings.xml | 3 +- app/src/main/res/values-da/strings.xml | 3 +- app/src/main/res/values-de/strings.xml | 3 +- app/src/main/res/values-el/strings.xml | 3 +- app/src/main/res/values-eo/strings.xml | 3 +- app/src/main/res/values-es/strings.xml | 3 +- app/src/main/res/values-et/strings.xml | 3 +- app/src/main/res/values-fi/strings.xml | 3 +- app/src/main/res/values-fr/strings.xml | 3 +- app/src/main/res/values-gl/strings.xml | 3 +- app/src/main/res/values-hr/strings.xml | 3 +- app/src/main/res/values-hu/strings.xml | 3 +- app/src/main/res/values-in/strings.xml | 3 +- app/src/main/res/values-is/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 3 +- app/src/main/res/values-iw/strings.xml | 3 +- app/src/main/res/values-ja/strings.xml | 3 +- app/src/main/res/values-ko-rKR/strings.xml | 3 +- app/src/main/res/values-lt/strings.xml | 3 +- app/src/main/res/values-ml/strings.xml | 3 +- app/src/main/res/values-my/strings.xml | 1 + app/src/main/res/values-nb-rNO/strings.xml | 3 +- app/src/main/res/values-nl/strings.xml | 3 +- app/src/main/res/values-pa-rPK/strings.xml | 1 + app/src/main/res/values-pl/strings.xml | 3 +- app/src/main/res/values-pt-rBR/strings.xml | 3 +- app/src/main/res/values-pt-rPT/strings.xml | 3 +- app/src/main/res/values-pt/strings.xml | 3 +- app/src/main/res/values-ro/strings.xml | 3 +- app/src/main/res/values-ru/strings.xml | 3 +- app/src/main/res/values-sk/strings.xml | 3 +- app/src/main/res/values-sl/strings.xml | 1 + app/src/main/res/values-sr/strings.xml | 1 + app/src/main/res/values-sv/strings.xml | 3 +- app/src/main/res/values-th/strings.xml | 3 +- app/src/main/res/values-tr/strings.xml | 3 +- app/src/main/res/values-uk/strings.xml | 3 +- app/src/main/res/values-zh-rCN/strings.xml | 3 +- app/src/main/res/values-zh-rTW/strings.xml | 3 +- app/src/main/res/values/strings.xml | 1 + 60 files changed, 507 insertions(+), 50 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt create mode 100644 app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/SleepTimer.kt create mode 100644 app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml diff --git a/app/build.gradle b/app/build.gradle index 573aa72..b922b26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,7 +76,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:7c1e5b5777' + implementation 'com.github.SimpleMobileTools:Simple-Commons:f64d11af6f' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8f40c07..32fc951 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,6 +10,7 @@ + @@ -132,6 +133,9 @@ android:resource="@xml/widget_bright_display" /> + + launchMoreAppsFromUsIntent() R.id.settings -> launchSettings() + R.id.sleep_timer -> showSleepTimer() R.id.about -> launchAbout() else -> return@setOnMenuItemClickListener false } @@ -279,6 +289,76 @@ class MainActivity : SimpleActivity() { mCameraImpl = null } + private fun showSleepTimer(force: Boolean = false) { + val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager + if (isSPlus() && !alarmManager.canScheduleExactAlarms() && !force) { + PermissionRequiredDialog( + this, + com.simplemobiletools.commons.R.string.allow_alarm_sleep_timer, + positiveActionCallback = { openRequestExactAlarmSettings(baseConfig.appId) }, + negativeActionCallback = { showSleepTimer(true) } + ) + return + } + val minutes = getString(R.string.minutes_raw) + val hour = resources.getQuantityString(R.plurals.hours, 1, 1) + + val items = arrayListOf( + RadioItem(5 * 60, "5 $minutes"), + RadioItem(10 * 60, "10 $minutes"), + RadioItem(20 * 60, "20 $minutes"), + RadioItem(30 * 60, "30 $minutes"), + RadioItem(60 * 60, hour) + ) + + if (items.none { it.id == config.lastSleepTimerSeconds }) { + val lastSleepTimerMinutes = config.lastSleepTimerSeconds / 60 + val text = resources.getQuantityString(R.plurals.minutes, lastSleepTimerMinutes, lastSleepTimerMinutes) + items.add(RadioItem(config.lastSleepTimerSeconds, text)) + } + + items.sortBy { it.id } + items.add(RadioItem(-1, getString(R.string.custom))) + + RadioGroupDialog(this, items, config.lastSleepTimerSeconds) { + if (it as Int == -1) { + SleepTimerCustomDialog(this) { + if (it > 0) { + pickedSleepTimer(it) + } + } + } else if (it > 0) { + pickedSleepTimer(it) + } + } + } + + private fun pickedSleepTimer(seconds: Int) { + config.lastSleepTimerSeconds = seconds + config.sleepInTS = System.currentTimeMillis() + seconds * 1000 + startSleepTimer() + } + + private fun startSleepTimer() { + binding.sleepTimerHolder.fadeIn() + startSleepTimerCountDown() + } + + private fun stopSleepTimer() { + binding.sleepTimerHolder.fadeOut() + stopSleepTimerCountDown() + } + + @Subscribe(threadMode = ThreadMode.MAIN) + fun sleepTimerChanged(event: Events.SleepTimerChanged) { + binding.sleepTimerValue.text = event.seconds.getFormattedDuration() + binding.sleepTimerHolder.beVisible() + + if (event.seconds == 0) { + finish() + } + } + @Subscribe fun stateChangedEvent(event: Events.StateChanged) { checkState(event.isEnabled) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt new file mode 100644 index 0000000..269fc5f --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt @@ -0,0 +1,33 @@ +package com.simplemobiletools.flashlight.dialogs + +import android.app.Activity +import androidx.appcompat.app.AlertDialog +import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.flashlight.R +import com.simplemobiletools.flashlight.databinding.DialogCustomSleepTimerPickerBinding + +class SleepTimerCustomDialog(val activity: Activity, val callback: (seconds: Int) -> Unit) { + private var dialog: AlertDialog? = null + private val binding = DialogCustomSleepTimerPickerBinding.inflate(activity.layoutInflater) + + init { + binding.minutesHint.hint = activity.getString(R.string.minutes_raw).replaceFirstChar { it.uppercaseChar() } + activity.getAlertDialogBuilder() + .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } + .setNegativeButton(R.string.cancel, null) + .apply { + activity.setupDialogStuff(binding.root, this, R.string.sleep_timer) { alertDialog -> + dialog = alertDialog + alertDialog.showKeyboard(binding.minutes) + } + } + } + + private fun dialogConfirmed() { + val value = binding.minutes.value + val minutes = Integer.valueOf(if (value.isEmpty()) "0" else value) + callback(minutes * 60) + activity.hideKeyboard() + dialog?.dismiss() + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Config.kt index 4e24b45..d6292b6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Config.kt @@ -44,4 +44,12 @@ class Config(context: Context) : BaseConfig(context) { var brightnessLevel: Int get() = prefs.getInt(BRIGHTNESS_LEVEL, DEFAULT_BRIGHTNESS_LEVEL) set(brightnessLevel) = prefs.edit().putInt(BRIGHTNESS_LEVEL, brightnessLevel).apply() + + var lastSleepTimerSeconds: Int + get() = prefs.getInt(LAST_SLEEP_TIMER_SECONDS, 30 * 60) + set(lastSleepTimerSeconds) = prefs.edit().putInt(LAST_SLEEP_TIMER_SECONDS, lastSleepTimerSeconds).apply() + + var sleepInTS: Long + get() = prefs.getLong(SLEEP_IN_TS, 0) + set(sleepInTS) = prefs.edit().putLong(SLEEP_IN_TS, sleepInTS).apply() } diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Constants.kt index 1517a9c..433e626 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/Constants.kt @@ -12,5 +12,7 @@ const val STROBOSCOPE_PROGRESS = "stroboscope_progress" const val FORCE_PORTRAIT_MODE = "force_portrait_mode" const val SOS = "sos" const val BRIGHTNESS_LEVEL = "brightness_level" +const val LAST_SLEEP_TIMER_SECONDS = "last_sleep_timer_seconds" +const val SLEEP_IN_TS = "sleep_in_ts" const val MIN_BRIGHTNESS_LEVEL = 1 const val DEFAULT_BRIGHTNESS_LEVEL = -1 diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt new file mode 100644 index 0000000..9fac360 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt @@ -0,0 +1,12 @@ +package com.simplemobiletools.flashlight.helpers + +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import kotlin.system.exitProcess + +class ShutDownReceiver : BroadcastReceiver() { + override fun onReceive(p0: Context?, p1: Intent?) { + exitProcess(0) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/SleepTimer.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/SleepTimer.kt new file mode 100644 index 0000000..960d636 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/SleepTimer.kt @@ -0,0 +1,70 @@ +package com.simplemobiletools.flashlight.helpers + +import android.app.AlarmManager +import android.app.PendingIntent +import android.content.Context +import android.content.Intent +import android.os.CountDownTimer +import com.simplemobiletools.commons.helpers.isSPlus +import com.simplemobiletools.flashlight.extensions.config +import com.simplemobiletools.flashlight.models.Events +import org.greenrobot.eventbus.EventBus +import kotlin.system.exitProcess + +private var isActive = false +private var sleepTimer: CountDownTimer? = null + +internal fun Context.toggleSleepTimer() { + if (isActive) { + stopSleepTimerCountDown() + } else { + startSleepTimerCountDown() + } +} + +internal fun Context.startSleepTimerCountDown() { + val millisInFuture = config.sleepInTS - System.currentTimeMillis() + 1000L + (getSystemService(Context.ALARM_SERVICE) as AlarmManager).apply { + if (!isSPlus() || canScheduleExactAlarms()) { + setExactAndAllowWhileIdle( + AlarmManager.RTC_WAKEUP, + config.sleepInTS, + getShutDownPendingIntent() + ) + } else { + setAndAllowWhileIdle( + AlarmManager.RTC_WAKEUP, + config.sleepInTS, + getShutDownPendingIntent() + ) + } + } + sleepTimer?.cancel() + sleepTimer = object : CountDownTimer(millisInFuture, 1000) { + override fun onTick(millisUntilFinished: Long) { + val seconds = (millisUntilFinished / 1000).toInt() + EventBus.getDefault().post(Events.SleepTimerChanged(seconds)) + } + + override fun onFinish() { + config.sleepInTS = 0 + EventBus.getDefault().post(Events.SleepTimerChanged(0)) + stopSleepTimerCountDown() + exitProcess(0) + } + } + + sleepTimer?.start() + isActive = true +} + +internal fun Context.stopSleepTimerCountDown() { + (getSystemService(Context.ALARM_SERVICE) as AlarmManager).cancel(getShutDownPendingIntent()) + sleepTimer?.cancel() + sleepTimer = null + isActive = false + config.sleepInTS = 0 +} + +internal fun Context.getShutDownPendingIntent() = + PendingIntent.getBroadcast(this, 0, Intent(this, ShutDownReceiver::class.java), PendingIntent.FLAG_IMMUTABLE) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/models/Events.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/models/Events.kt index 77debec..b5f86ca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/models/Events.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/models/Events.kt @@ -8,4 +8,6 @@ class Events { class StopStroboscope class StopSOS + + class SleepTimerChanged(val seconds: Int) } diff --git a/app/src/main/res/layout/activity_bright_display.xml b/app/src/main/res/layout/activity_bright_display.xml index 2a31099..e9e29b5 100644 --- a/app/src/main/res/layout/activity_bright_display.xml +++ b/app/src/main/res/layout/activity_bright_display.xml @@ -1,5 +1,7 @@ @@ -19,4 +21,71 @@ android:alpha="0.5" android:text="@string/change_color" /> + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 1547162..a73b59d 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,6 +1,7 @@ @@ -111,6 +112,72 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/stroboscope_btn" /> + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml b/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml new file mode 100644 index 0000000..91bd078 --- /dev/null +++ b/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml index b517bc7..40efc45 100644 --- a/app/src/main/res/menu/menu.xml +++ b/app/src/main/res/menu/menu.xml @@ -13,6 +13,10 @@ android:icon="@drawable/ic_info_vector" android:title="@string/about" app:showAsAction="always" /> + فشل الحصول على الكاميرا الحصول على إذن تصوير ضروري للتأثيرات شاشة ساطعة +مؤقت النوم إظهار زر عرض ساطع إظهار زر ستروبوسكوب diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index ae9c96b..0a8969e 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -5,6 +5,7 @@ Kamera əlçatan deyil Düzgün strob effekti üçün kamera icazəsi gərəkdir Bright display + Sleep timer İşıqlı ekran düyməsi göstər Stroboskop düyməsi göstər @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index b98d983..150cf57 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -5,6 +5,7 @@ Не атрымалася атрымаць камеру Дазвол на доступ да камеры неабходны для стварэння эфекту страбаскопа Яркі экран + Таймер сну Паказваць кнопку яркага экрана Паказваць кнопку страбаскопа @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 8d0e812..03f6814 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -5,6 +5,7 @@ Неуспешен достъп до камера Разрешение за използване на камерата е необходимо за постигане на подходящ стробоскопичен ефект Ярък дисплей + Таймер за заспиване Покажи ярък дисплей бутон Покажи стробинг бутон @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 4076afc..4bcd5ac 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -5,6 +5,7 @@ Ha fallat l\'accés a la càmera És necessari el permís de la càmera per a un efecte estroboscòpic adequat Pantalla lluminosa + Temporitzador per adormir-se Mostra un botó de pantalla lluminosa Mostra un botó d\'estroboscopi @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 32cb487..e65aeab 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -5,6 +5,7 @@ Přístup k fotoaparátu se nezdařil Přístup k fotoaparátu je potřebný pro správný stroboskopický efekt Jasný displej + Časovač vypnutí Zobrazit tlačítko pro jasný displej Zobrazit tlačítko pro stroboskop @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index d70cd82..004a81a 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -5,6 +5,7 @@ Methwyd cael at y camera Rhaid cael caniatâd y camera i\'r effaith strobosgop Bright display + Sleep timer Dangos botwm dangosydd llachar Dangos botwm strobosgop @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index d392cbd..2d05f88 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -5,6 +5,7 @@ Forbindelse til kameraet mislykkedes Kameratilladelse er nødvendig for korrekt stroboskopeffekt Lyst display + Timer til slumretilstand Vis en lys skærmknap Vis en stroboskop-knap @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e23dbba..863a920 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -5,6 +5,7 @@ Beanspruchen der Kamera fehlgeschlagen Kameraberechtigung ist für den Stroboskopeffekt erforderlich Heller Bildschirm + Sleeptimer Schaltfläche für hellen Bildschirm zeigen Schaltfläche für Stroboskop zeigen @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 4e715fd..7f22cc9 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -5,6 +5,7 @@ Η εύρεση της κάμερας απέτυχε Χρειάζεται άδεια χρήσης της κάμερας για τη σωστή λειτουργία στροβοσκοπίου Φωτεινή οθόνη + Χρονοδιακόπτης Προβολή κουμπιού φωτεινότητας Προβολή κουμπιού στροβοσκοπίου @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 5cf0e2b..d373829 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -5,6 +5,7 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Hela ekrano + Sleep timer Montri butonon por hela ekrano Show a stroboscope button @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a44ebb6..da5bab5 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -5,6 +5,7 @@ Ha fallado el acceso a la cámara El permiso de acceso a la cámara es necesario para un apropiado efecto estroboscópico Pantalla brillante + Temporizador Mostrar botón de pantalla brillante Mostrar botón de estroboscopio @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 0be7081..92e4bda 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -5,6 +5,7 @@ Kaamera liidestamine ei õnnestunud Toimiva stroboskoopilise efekti jaoks on vajalik kaamera kasutamise luba Kirgas ekraan + Unetaimer Näita nuppu ekraanil kirkana Näita stroboskoobi nuppu @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 1785a81..c5406f1 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -5,6 +5,7 @@ Kameran saanti epäonnistui Lupa kameraan vaaditaan oikean stroboskooppisen vaikutuksen saavuttamiseksi Kirkas näyttö + Uniajastin Näytä kirkas näyttö -painike Näytä stroboskooppipainike @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 9287a1f..1c14842 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -5,6 +5,7 @@ Échec de l\'obtention de l\'appareil photo L\'autorisation d\'accès à l\'appareil photo est nécessaire pour un effet stroboscope correct Affichage lumineux + Minuterie de veille Afficher un bouton écran lumineux Afficher un bouton stroboscope @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 67ca079..0ca6587 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -5,6 +5,7 @@ Erro ao obter a cámara O permiso da cámara é necesario para utilizar o efecto estroboscopio Pantalla brillante + Temporizador Mostrar un botón para iluminala pantalla Mostrar un botón estroboscopio @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index efe45f5..241ce5b 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -5,6 +5,7 @@ Nije moguće pristupiti kameri Potrebna je dozvola za pristup kameri za pravilan stroboskopski efekt Svijetli ekran + Mjerač vremena za isključivanje Prikaži gumb za svijetli ekran Prikaži gumb za stroboskop @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 9a3fe55..2884fda 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -5,6 +5,7 @@ A kamera megszerzése sikertelen A Kamera engedély szükséges a megfelelő stroboszkóp hatáshoz Fényes kijelző + Alvásidőzítő Fényes kijelző gomb megjelenítése Stroboszkóp gomb megjelenítése @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 6eafd73..b1f8331 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -5,6 +5,7 @@ Gagal mendapatkan kamera Izin kamera diperlukan untuk efek stroboscope yang tepat Layar cerah + Timer tidur Tampilkan tombol tampilan cerah Tampilkan tombol stroboscope @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index a91207e..08b189a 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -5,6 +5,7 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display + Tímarofi Show a bright display button Show a stroboscope button diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 023e51b..7f3a008 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -5,6 +5,7 @@ Impossibile rilevare la fotocamera Il permesso per la fotocamera è necessario per l\'effetto stroboscopico Schermo luminoso + Timer di spegnimento Mostra un pulsante per lo schermo luminoso Mostra un pulsante per l\'effetto stroboscopico @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index fc9a343..0763d5d 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -5,6 +5,7 @@ השגת המצלמה נכשלה הרשאת מצלמה נחוצה לאפקט סטרובוסקופ תקין תצוגה בהירה + טיימר שינה הצג כפתור תצוגה בהיר הצג כפתור סטרובוסקופ @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 253b2ab..9af8777 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -5,6 +5,7 @@ カメラの取得に失敗しました 適切なストロボ効果のために、カメラのアクセス許可が必要です 明るい画面 + スリープタイマー 明るく表示ボタンを表示 ストロボボタンを表示 @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 6b0b97f..a80fd28 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -5,6 +5,7 @@ 카메라 취득 실패 적절한 스트로보 스코프 효과를 얻으려면 카메라 사용 권한이 필요합니다. Bright display + 취침 타이머 브라이트 디스플레이 버튼 활성화 스트로보 스코프 버튼 활성화 @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index be439d9..f0b6292 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -5,6 +5,7 @@ Nepavyko gauti prieigos prie kameros Fotoaparato leidimas yra būtinas tinkamam stroboskopo efektui Ryškus ekranas + Miego laikmatis Rodyti ryškaus ekrano mygtuką Rodyti stroboskopo mygtuką @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index bbd7b3f..758b97a 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -5,6 +5,7 @@ ക്യാമറ നേടുന്നത് പരാജയപ്പെട്ടു ശരിയായ സ്ട്രോബോസ്കോപ്പിക് ഇഫക്റ്റിന് ക്യാമറ അനുമതി ആവശ്യമാണ് ബ്രൈറ്റ് ഡിസ്പ്ലേ + Sleep timer ബ്രൈറ്റ് ഡിസ്പ്ലേ ബട്ടൺ കാണിക്കുക ഒരു സ്ട്രോബോസ്കോപ്പ് ബട്ടൺ കാണിക്കുക @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-my/strings.xml b/app/src/main/res/values-my/strings.xml index 7a28741..731de94 100644 --- a/app/src/main/res/values-my/strings.xml +++ b/app/src/main/res/values-my/strings.xml @@ -5,6 +5,7 @@ ကင်မရာနှင့်ပတ်သတ်​သောအချို့အယွင်း အချက်ပြမီးလုပ်​ဆောင်မှုအတွက် ကင်မရာခွင့်ပြုချက်လိုအပ်ပါသည် မှန်သားပြင်အလင်း + Sleep timer မှန်သားပြင်အလင်း ခလုတ်ပြပါ အချက်ပြမီး ခလုတ် ပြပါ diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 722683e..b18ac26 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -5,6 +5,7 @@ Obtaining the camera failed Kameratillatelse er nødvendig for riktig stroboskopeffekt Lys skjerm + Søvntidsur Vis en lys skjermknapp Vis en stroboskop-knapp @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 5f0feb3..9d116b3 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,6 +5,7 @@ Toegang tot de camera geweigerd De permissie Camera is nodig voor het stroboscoopeffect Fel scherm + Slaaptimer Knop voor fel scherm tonen Knop voor stroboscoop tonen @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 3dc95fd..5d93105 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -5,6 +5,7 @@ کیمرہ پہنچ نہیں سکدا سٹروبوسکوپ لئی کیمرہ دی اِجازت ضروری اے چمکدار ڈیسپلے + سوتے دی گھڑی چمکدار ڈیسپلے بٹن دکھاؤ سٹروبوسکوپ بٹن دکھاؤ diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 27eaf31..dda1da1 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -5,6 +5,7 @@ Nie udało się uzyskać dostępu do aparatu Dostęp do aparatu jest niezbędny dla prawidłowego efektu stroboskopowego Jasny wyświetlacz + Wyłącznik czasowy Pokazuj przycisk jasnego wyświetlacza Pokazuj przycisk stroboskopu @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 63b9a4b..0e32af2 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -5,6 +5,7 @@ Erro ao obter a câmera A permissão para a câmera é necessária para usar o estroboscópio Tela brilhante + Temporizador de sono Mostrar o botão de tela brilhante Mostrar o botão do Estroboscópio @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index d9dafab..b7bc71e 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -5,6 +5,7 @@ Falha no acesso à câmera O efeito estroboscópico requer a permissão da câmara Ecrã luminoso + Sleep timer Mostrar botão de ecrã luminoso Mostrar botão do estroboscópio @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index bda673e..25efa95 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -5,6 +5,7 @@ Falha ao aceder à câmera O efeito estroboscópio requer a permissão da câmara Ecrã luminoso + Temporizador Mostrar botão de ecrã luminoso Mostrar botão do estroboscópio @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index ccc8a2b..b84b2f0 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -5,6 +5,7 @@ Obținerea camerei a eșuat Permisul camerei este necesar pentru un efect stroboscopic adecvat Ecran luminos + Temporizator de somn Afișaţi un buton pentru ecran luminos Afișaţi un buton pentru stroboscop @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 26a2c81..cfc4706 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -5,6 +5,7 @@ Не удалось получить доступ к камере Разрешение на доступ к камере необходимо для создания эффекта стробоскопа Яркий экран + Таймер сна Показать кнопку яркого экрана Показать кнопку стробоскопа @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index e918bb8..7fb2e0a 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -5,6 +5,7 @@ Prístup ku kamere zlyhal Obtaining the camera failed Pre správny stroboskopický efekt je potrebný prístup ku kamere Jasný displej + Časovač vypnutia Zobraziť tlačidlo pre jasný displej Zobraziť tlačidlo pre stroboskop @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index e9a7dea..b05d8d7 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -5,6 +5,7 @@ Pridobivanje kamere ni uspelo Za ustrezen učinek stroboskopa je pogoj dovoljenje kamere Svetli zaslon + Časovnik za spanje Pokažite gumb za svetel zaslon Prikaži gumb stroboskopa diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 14c4fd0..54e190b 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -5,6 +5,7 @@ Добијање камере није успело Дозвола камере је неопходна за правилан ефекат стробоскопа Светао екран + Мерач спавања Прикажи светло дугме за екран Прикажи дугме за стробоскоп diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 330c4a8..096c940 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -5,6 +5,7 @@ Det gick inte att komma åt kameran Kamerabehörigheten behövs för en riktig stroboskopeffekt Ljus skärm + Insomningstimer Visa en knapp för ljus skärm Visa en stroboskopknapp @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index e0f0ef0..cee81e8 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -5,6 +5,7 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display + Sleep timer Show a bright display button Show a stroboscope button @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index dadd0bb..eb67e23 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -5,6 +5,7 @@ Kamera hatası Düzgün stroboskop etkisi için kamera izni gereklidir Parlak ekran + Uyku zamanlayıcısı Parlak ekran düğmesini göster Stroboskop düğmesini göster @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index e288077..5a4bdef 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -5,6 +5,7 @@ Не вдалося отримати доступ до камери Дозвіл на доступ до камери необхідний для створення ефекту стробоскопа Яскравий дисплей + Таймер сну Показувати кнопку перемикання на білий дисплей Показувати кнопку стробоскопа @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 893bd80..4af019e 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -5,6 +5,7 @@ 获取相机失败 相机权限对于正确的频闪仪效果是必须的 高亮屏幕 + 睡眠定时器 显示高亮屏幕按钮 显示频闪仪按钮 @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 04489b1..fd681ca 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -5,6 +5,7 @@ 未能取得相機 相機權限對於閃爍效果是必要的 Bright display + 睡眠定時器 顯示螢幕發亮按鈕 顯示閃爍效果按鈕 @@ -14,4 +15,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ece8103..cee81e8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,6 +5,7 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display + Sleep timer Show a bright display button Show a stroboscope button From 482aef3d657223757bda36f199d23d815cadb82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 4 Sep 2023 16:49:34 +0200 Subject: [PATCH 02/11] Use shared sleep_timer string --- app/build.gradle | 2 +- app/src/main/res/values-ar/strings.xml | 3 +-- app/src/main/res/values-az/strings.xml | 1 - app/src/main/res/values-be/strings.xml | 1 - app/src/main/res/values-bg/strings.xml | 1 - app/src/main/res/values-ca/strings.xml | 1 - app/src/main/res/values-cs/strings.xml | 1 - app/src/main/res/values-cy/strings.xml | 1 - app/src/main/res/values-da/strings.xml | 1 - app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-el/strings.xml | 1 - app/src/main/res/values-eo/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-et/strings.xml | 1 - app/src/main/res/values-fi/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-gl/strings.xml | 1 - app/src/main/res/values-hr/strings.xml | 1 - app/src/main/res/values-hu/strings.xml | 1 - app/src/main/res/values-in/strings.xml | 1 - app/src/main/res/values-is/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-iw/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-ko-rKR/strings.xml | 1 - app/src/main/res/values-lt/strings.xml | 1 - app/src/main/res/values-ml/strings.xml | 1 - app/src/main/res/values-my/strings.xml | 1 - app/src/main/res/values-nb-rNO/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pa-rPK/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-pt-rPT/strings.xml | 1 - app/src/main/res/values-pt/strings.xml | 1 - app/src/main/res/values-ro/strings.xml | 1 - app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values-sk/strings.xml | 1 - app/src/main/res/values-sl/strings.xml | 1 - app/src/main/res/values-sr/strings.xml | 1 - app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values-th/strings.xml | 1 - app/src/main/res/values-tr/strings.xml | 1 - app/src/main/res/values-uk/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values-zh-rTW/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - 47 files changed, 2 insertions(+), 48 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b922b26..fa957dc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,7 +76,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:f64d11af6f' + implementation 'com.github.esensar:Simple-Commons:952c4c0fee' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index cc8e824..973f169 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -5,7 +5,6 @@ فشل الحصول على الكاميرا الحصول على إذن تصوير ضروري للتأثيرات شاشة ساطعة -مؤقت النوم إظهار زر عرض ساطع إظهار زر ستروبوسكوب @@ -15,4 +14,4 @@ Haven't found some strings? There's more at https://github.com/SimpleMobileTools/Simple-Commons/tree/master/commons/src/main/res --> - \ No newline at end of file + diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index 0a8969e..edc4fdd 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -5,7 +5,6 @@ Kamera əlçatan deyil Düzgün strob effekti üçün kamera icazəsi gərəkdir Bright display - Sleep timer İşıqlı ekran düyməsi göstər Stroboskop düyməsi göstər diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 150cf57..e139ba8 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -5,7 +5,6 @@ Не атрымалася атрымаць камеру Дазвол на доступ да камеры неабходны для стварэння эфекту страбаскопа Яркі экран - Таймер сну Паказваць кнопку яркага экрана Паказваць кнопку страбаскопа diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 03f6814..306e229 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -5,7 +5,6 @@ Неуспешен достъп до камера Разрешение за използване на камерата е необходимо за постигане на подходящ стробоскопичен ефект Ярък дисплей - Таймер за заспиване Покажи ярък дисплей бутон Покажи стробинг бутон diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 4bcd5ac..2fbaa77 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -5,7 +5,6 @@ Ha fallat l\'accés a la càmera És necessari el permís de la càmera per a un efecte estroboscòpic adequat Pantalla lluminosa - Temporitzador per adormir-se Mostra un botó de pantalla lluminosa Mostra un botó d\'estroboscopi diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index e65aeab..7b42494 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -5,7 +5,6 @@ Přístup k fotoaparátu se nezdařil Přístup k fotoaparátu je potřebný pro správný stroboskopický efekt Jasný displej - Časovač vypnutí Zobrazit tlačítko pro jasný displej Zobrazit tlačítko pro stroboskop diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 004a81a..3aca0aa 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -5,7 +5,6 @@ Methwyd cael at y camera Rhaid cael caniatâd y camera i\'r effaith strobosgop Bright display - Sleep timer Dangos botwm dangosydd llachar Dangos botwm strobosgop diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 2d05f88..2dc7fb3 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -5,7 +5,6 @@ Forbindelse til kameraet mislykkedes Kameratilladelse er nødvendig for korrekt stroboskopeffekt Lyst display - Timer til slumretilstand Vis en lys skærmknap Vis en stroboskop-knap diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 863a920..a5a8461 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -5,7 +5,6 @@ Beanspruchen der Kamera fehlgeschlagen Kameraberechtigung ist für den Stroboskopeffekt erforderlich Heller Bildschirm - Sleeptimer Schaltfläche für hellen Bildschirm zeigen Schaltfläche für Stroboskop zeigen diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 7f22cc9..9187c52 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -5,7 +5,6 @@ Η εύρεση της κάμερας απέτυχε Χρειάζεται άδεια χρήσης της κάμερας για τη σωστή λειτουργία στροβοσκοπίου Φωτεινή οθόνη - Χρονοδιακόπτης Προβολή κουμπιού φωτεινότητας Προβολή κουμπιού στροβοσκοπίου diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index d373829..ead9f56 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -5,7 +5,6 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Hela ekrano - Sleep timer Montri butonon por hela ekrano Show a stroboscope button diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index da5bab5..c9d9071 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -5,7 +5,6 @@ Ha fallado el acceso a la cámara El permiso de acceso a la cámara es necesario para un apropiado efecto estroboscópico Pantalla brillante - Temporizador Mostrar botón de pantalla brillante Mostrar botón de estroboscopio diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml index 92e4bda..407f574 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -5,7 +5,6 @@ Kaamera liidestamine ei õnnestunud Toimiva stroboskoopilise efekti jaoks on vajalik kaamera kasutamise luba Kirgas ekraan - Unetaimer Näita nuppu ekraanil kirkana Näita stroboskoobi nuppu diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index c5406f1..e170b81 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -5,7 +5,6 @@ Kameran saanti epäonnistui Lupa kameraan vaaditaan oikean stroboskooppisen vaikutuksen saavuttamiseksi Kirkas näyttö - Uniajastin Näytä kirkas näyttö -painike Näytä stroboskooppipainike diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 1c14842..759a290 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -5,7 +5,6 @@ Échec de l\'obtention de l\'appareil photo L\'autorisation d\'accès à l\'appareil photo est nécessaire pour un effet stroboscope correct Affichage lumineux - Minuterie de veille Afficher un bouton écran lumineux Afficher un bouton stroboscope diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 0ca6587..7e34be5 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -5,7 +5,6 @@ Erro ao obter a cámara O permiso da cámara é necesario para utilizar o efecto estroboscopio Pantalla brillante - Temporizador Mostrar un botón para iluminala pantalla Mostrar un botón estroboscopio diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 241ce5b..4ab4759 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -5,7 +5,6 @@ Nije moguće pristupiti kameri Potrebna je dozvola za pristup kameri za pravilan stroboskopski efekt Svijetli ekran - Mjerač vremena za isključivanje Prikaži gumb za svijetli ekran Prikaži gumb za stroboskop diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 2884fda..4efa3f0 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -5,7 +5,6 @@ A kamera megszerzése sikertelen A Kamera engedély szükséges a megfelelő stroboszkóp hatáshoz Fényes kijelző - Alvásidőzítő Fényes kijelző gomb megjelenítése Stroboszkóp gomb megjelenítése diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index b1f8331..870b035 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -5,7 +5,6 @@ Gagal mendapatkan kamera Izin kamera diperlukan untuk efek stroboscope yang tepat Layar cerah - Timer tidur Tampilkan tombol tampilan cerah Tampilkan tombol stroboscope diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml index 08b189a..a91207e 100644 --- a/app/src/main/res/values-is/strings.xml +++ b/app/src/main/res/values-is/strings.xml @@ -5,7 +5,6 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display - Tímarofi Show a bright display button Show a stroboscope button diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 7f3a008..19cc80f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -5,7 +5,6 @@ Impossibile rilevare la fotocamera Il permesso per la fotocamera è necessario per l\'effetto stroboscopico Schermo luminoso - Timer di spegnimento Mostra un pulsante per lo schermo luminoso Mostra un pulsante per l\'effetto stroboscopico diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 0763d5d..5337a46 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -5,7 +5,6 @@ השגת המצלמה נכשלה הרשאת מצלמה נחוצה לאפקט סטרובוסקופ תקין תצוגה בהירה - טיימר שינה הצג כפתור תצוגה בהיר הצג כפתור סטרובוסקופ diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 9af8777..ac08e8f 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -5,7 +5,6 @@ カメラの取得に失敗しました 適切なストロボ効果のために、カメラのアクセス許可が必要です 明るい画面 - スリープタイマー 明るく表示ボタンを表示 ストロボボタンを表示 diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index a80fd28..739b2df 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -5,7 +5,6 @@ 카메라 취득 실패 적절한 스트로보 스코프 효과를 얻으려면 카메라 사용 권한이 필요합니다. Bright display - 취침 타이머 브라이트 디스플레이 버튼 활성화 스트로보 스코프 버튼 활성화 diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index f0b6292..d26b505 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -5,7 +5,6 @@ Nepavyko gauti prieigos prie kameros Fotoaparato leidimas yra būtinas tinkamam stroboskopo efektui Ryškus ekranas - Miego laikmatis Rodyti ryškaus ekrano mygtuką Rodyti stroboskopo mygtuką diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 758b97a..8268d79 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -5,7 +5,6 @@ ക്യാമറ നേടുന്നത് പരാജയപ്പെട്ടു ശരിയായ സ്ട്രോബോസ്കോപ്പിക് ഇഫക്റ്റിന് ക്യാമറ അനുമതി ആവശ്യമാണ് ബ്രൈറ്റ് ഡിസ്പ്ലേ - Sleep timer ബ്രൈറ്റ് ഡിസ്പ്ലേ ബട്ടൺ കാണിക്കുക ഒരു സ്ട്രോബോസ്കോപ്പ് ബട്ടൺ കാണിക്കുക diff --git a/app/src/main/res/values-my/strings.xml b/app/src/main/res/values-my/strings.xml index 731de94..7a28741 100644 --- a/app/src/main/res/values-my/strings.xml +++ b/app/src/main/res/values-my/strings.xml @@ -5,7 +5,6 @@ ကင်မရာနှင့်ပတ်သတ်​သောအချို့အယွင်း အချက်ပြမီးလုပ်​ဆောင်မှုအတွက် ကင်မရာခွင့်ပြုချက်လိုအပ်ပါသည် မှန်သားပြင်အလင်း - Sleep timer မှန်သားပြင်အလင်း ခလုတ်ပြပါ အချက်ပြမီး ခလုတ် ပြပါ diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index b18ac26..5d39bd6 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -5,7 +5,6 @@ Obtaining the camera failed Kameratillatelse er nødvendig for riktig stroboskopeffekt Lys skjerm - Søvntidsur Vis en lys skjermknapp Vis en stroboskop-knapp diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 9d116b3..fadae7b 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -5,7 +5,6 @@ Toegang tot de camera geweigerd De permissie Camera is nodig voor het stroboscoopeffect Fel scherm - Slaaptimer Knop voor fel scherm tonen Knop voor stroboscoop tonen diff --git a/app/src/main/res/values-pa-rPK/strings.xml b/app/src/main/res/values-pa-rPK/strings.xml index 5d93105..3dc95fd 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -5,7 +5,6 @@ کیمرہ پہنچ نہیں سکدا سٹروبوسکوپ لئی کیمرہ دی اِجازت ضروری اے چمکدار ڈیسپلے - سوتے دی گھڑی چمکدار ڈیسپلے بٹن دکھاؤ سٹروبوسکوپ بٹن دکھاؤ diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index dda1da1..befd109 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -5,7 +5,6 @@ Nie udało się uzyskać dostępu do aparatu Dostęp do aparatu jest niezbędny dla prawidłowego efektu stroboskopowego Jasny wyświetlacz - Wyłącznik czasowy Pokazuj przycisk jasnego wyświetlacza Pokazuj przycisk stroboskopu diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0e32af2..d5e7080 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -5,7 +5,6 @@ Erro ao obter a câmera A permissão para a câmera é necessária para usar o estroboscópio Tela brilhante - Temporizador de sono Mostrar o botão de tela brilhante Mostrar o botão do Estroboscópio diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index b7bc71e..5295033 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -5,7 +5,6 @@ Falha no acesso à câmera O efeito estroboscópico requer a permissão da câmara Ecrã luminoso - Sleep timer Mostrar botão de ecrã luminoso Mostrar botão do estroboscópio diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 25efa95..d30f233 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -5,7 +5,6 @@ Falha ao aceder à câmera O efeito estroboscópio requer a permissão da câmara Ecrã luminoso - Temporizador Mostrar botão de ecrã luminoso Mostrar botão do estroboscópio diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index b84b2f0..d716ec5 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -5,7 +5,6 @@ Obținerea camerei a eșuat Permisul camerei este necesar pentru un efect stroboscopic adecvat Ecran luminos - Temporizator de somn Afișaţi un buton pentru ecran luminos Afișaţi un buton pentru stroboscop diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index cfc4706..dffe14c 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -5,7 +5,6 @@ Не удалось получить доступ к камере Разрешение на доступ к камере необходимо для создания эффекта стробоскопа Яркий экран - Таймер сна Показать кнопку яркого экрана Показать кнопку стробоскопа diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 7fb2e0a..42599cb 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -5,7 +5,6 @@ Prístup ku kamere zlyhal Obtaining the camera failed Pre správny stroboskopický efekt je potrebný prístup ku kamere Jasný displej - Časovač vypnutia Zobraziť tlačidlo pre jasný displej Zobraziť tlačidlo pre stroboskop diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index b05d8d7..e9a7dea 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -5,7 +5,6 @@ Pridobivanje kamere ni uspelo Za ustrezen učinek stroboskopa je pogoj dovoljenje kamere Svetli zaslon - Časovnik za spanje Pokažite gumb za svetel zaslon Prikaži gumb stroboskopa diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 54e190b..14c4fd0 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -5,7 +5,6 @@ Добијање камере није успело Дозвола камере је неопходна за правилан ефекат стробоскопа Светао екран - Мерач спавања Прикажи светло дугме за екран Прикажи дугме за стробоскоп diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 096c940..e5fff7e 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -5,7 +5,6 @@ Det gick inte att komma åt kameran Kamerabehörigheten behövs för en riktig stroboskopeffekt Ljus skärm - Insomningstimer Visa en knapp för ljus skärm Visa en stroboskopknapp diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index cee81e8..ece8103 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -5,7 +5,6 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display - Sleep timer Show a bright display button Show a stroboscope button diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index eb67e23..8f28b43 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -5,7 +5,6 @@ Kamera hatası Düzgün stroboskop etkisi için kamera izni gereklidir Parlak ekran - Uyku zamanlayıcısı Parlak ekran düğmesini göster Stroboskop düğmesini göster diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 5a4bdef..6701d5c 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -5,7 +5,6 @@ Не вдалося отримати доступ до камери Дозвіл на доступ до камери необхідний для створення ефекту стробоскопа Яскравий дисплей - Таймер сну Показувати кнопку перемикання на білий дисплей Показувати кнопку стробоскопа diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4af019e..b0a71cb 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -5,7 +5,6 @@ 获取相机失败 相机权限对于正确的频闪仪效果是必须的 高亮屏幕 - 睡眠定时器 显示高亮屏幕按钮 显示频闪仪按钮 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index fd681ca..3b04cb7 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -5,7 +5,6 @@ 未能取得相機 相機權限對於閃爍效果是必要的 Bright display - 睡眠定時器 顯示螢幕發亮按鈕 顯示閃爍效果按鈕 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cee81e8..ece8103 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,7 +5,6 @@ Obtaining the camera failed Camera permission is necessary for proper stroboscope effect Bright display - Sleep timer Show a bright display button Show a stroboscope button From 543362cccb75de0b37dcc51675e5786f0b89f084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 08:08:18 +0200 Subject: [PATCH 03/11] Update Simple-Commons ref --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index fa957dc..f67467b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,7 +76,7 @@ android { } dependencies { - implementation 'com.github.esensar:Simple-Commons:952c4c0fee' + implementation 'com.github.SimpleMobileTools:Simple-Commons:73d78e5cd3' implementation 'org.greenrobot:eventbus:3.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } From 2572f7cfbfb050dabc36e244810a270e9136ff66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 08:08:28 +0200 Subject: [PATCH 04/11] Properly update sleep timer color on resume --- .../simplemobiletools/flashlight/activities/MainActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index e2cd7d0..ef3f53e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -6,6 +6,7 @@ import android.content.Context import android.content.Intent import android.content.pm.ActivityInfo import android.content.pm.ShortcutInfo +import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Icon import android.graphics.drawable.LayerDrawable import android.os.Bundle @@ -114,6 +115,9 @@ class MainActivity : SimpleActivity() { } } + binding.sleepTimerHolder.background = ColorDrawable(getProperBackgroundColor()) + binding.sleepTimerStop.applyColorFilter(getProperTextColor()) + requestedOrientation = if (config.forcePortraitMode) ActivityInfo.SCREEN_ORIENTATION_PORTRAIT else ActivityInfo.SCREEN_ORIENTATION_SENSOR invalidateOptionsMenu() From c00d4cc30c3075a4e87fb5631d3921aff9b389c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 08:10:21 +0200 Subject: [PATCH 05/11] Add more lower default values for sleep timer --- .../com/simplemobiletools/flashlight/activities/MainActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index ef3f53e..e66347f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -308,6 +308,8 @@ class MainActivity : SimpleActivity() { val hour = resources.getQuantityString(R.plurals.hours, 1, 1) val items = arrayListOf( + RadioItem(1 * 60, "1 $minutes"), + RadioItem(2 * 60, "2 $minutes"), RadioItem(5 * 60, "5 $minutes"), RadioItem(10 * 60, "10 $minutes"), RadioItem(20 * 60, "20 $minutes"), From 788ef6f01f046a56ecece5db04a595d2d1a9f7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 09:58:24 +0200 Subject: [PATCH 06/11] Add radio button for seconds for custom sleep timer --- .../flashlight/activities/MainActivity.kt | 10 +++++- .../dialogs/SleepTimerCustomDialog.kt | 28 ++++++++++++---- .../dialog_custom_sleep_timer_picker.xml | 33 ++++++++++++++++--- 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index e66347f..e5c6d1b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -319,7 +319,15 @@ class MainActivity : SimpleActivity() { if (items.none { it.id == config.lastSleepTimerSeconds }) { val lastSleepTimerMinutes = config.lastSleepTimerSeconds / 60 - val text = resources.getQuantityString(R.plurals.minutes, lastSleepTimerMinutes, lastSleepTimerMinutes) + val lastSleepTimerSeconds = config.lastSleepTimerSeconds % 60 + val parts = mutableListOf() + if (lastSleepTimerMinutes != 0) { + parts.add(resources.getQuantityString(R.plurals.minutes, lastSleepTimerMinutes, lastSleepTimerMinutes)) + } + if (lastSleepTimerSeconds != 0) { + parts.add(resources.getQuantityString(R.plurals.seconds, lastSleepTimerSeconds, lastSleepTimerSeconds)) + } + val text = parts.joinToString(separator = " ") items.add(RadioItem(config.lastSleepTimerSeconds, text)) } diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt index 269fc5f..ce6b989 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/dialogs/SleepTimerCustomDialog.kt @@ -1,6 +1,7 @@ package com.simplemobiletools.flashlight.dialogs import android.app.Activity +import android.view.inputmethod.EditorInfo import androidx.appcompat.app.AlertDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.flashlight.R @@ -11,23 +12,38 @@ class SleepTimerCustomDialog(val activity: Activity, val callback: (seconds: Int private val binding = DialogCustomSleepTimerPickerBinding.inflate(activity.layoutInflater) init { - binding.minutesHint.hint = activity.getString(R.string.minutes_raw).replaceFirstChar { it.uppercaseChar() } + binding.dialogRadioView.check(R.id.dialog_radio_minutes) + binding.timerValue.setOnEditorActionListener { _, actionId, _ -> + if (actionId == EditorInfo.IME_ACTION_DONE) { + dialogConfirmed() + return@setOnEditorActionListener true + } + return@setOnEditorActionListener false + } + activity.getAlertDialogBuilder() - .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } + .setPositiveButton(R.string.ok) { _, _ -> dialogConfirmed() } .setNegativeButton(R.string.cancel, null) .apply { activity.setupDialogStuff(binding.root, this, R.string.sleep_timer) { alertDialog -> dialog = alertDialog - alertDialog.showKeyboard(binding.minutes) + alertDialog.showKeyboard(binding.timerValue) } } } private fun dialogConfirmed() { - val value = binding.minutes.value - val minutes = Integer.valueOf(if (value.isEmpty()) "0" else value) - callback(minutes * 60) + val value = binding.timerValue.value + val minutes = Integer.valueOf(value.ifEmpty { "0" }) + val multiplier = getMultiplier(binding.dialogRadioView.checkedRadioButtonId) + callback(minutes * multiplier) activity.hideKeyboard() dialog?.dismiss() } + + private fun getMultiplier(id: Int) = when (id) { + R.id.dialog_radio_seconds -> 1 + R.id.dialog_radio_minutes -> 60 + else -> 60 + } } diff --git a/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml b/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml index 91bd078..14a0446 100644 --- a/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml +++ b/app/src/main/res/layout/dialog_custom_sleep_timer_picker.xml @@ -3,19 +3,19 @@ android:id="@+id/dialog_custom_sleep_timer_holder" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" + android:orientation="vertical" android:paddingLeft="@dimen/activity_margin" android:paddingTop="@dimen/activity_margin" android:paddingRight="@dimen/activity_margin"> + android:hint="@string/value"> + + + + + + + + From c55e784081174eb025af66c1851cee5e1190ecd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:35:34 +0200 Subject: [PATCH 07/11] Fix 1 minute radio item string --- .../simplemobiletools/flashlight/activities/MainActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index e5c6d1b..6572920 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -306,9 +306,10 @@ class MainActivity : SimpleActivity() { } val minutes = getString(R.string.minutes_raw) val hour = resources.getQuantityString(R.plurals.hours, 1, 1) + val minute = resources.getQuantityString(R.plurals.minutes, 1, 1) val items = arrayListOf( - RadioItem(1 * 60, "1 $minutes"), + RadioItem(1 * 60, "1 $minute"), RadioItem(2 * 60, "2 $minutes"), RadioItem(5 * 60, "5 $minutes"), RadioItem(10 * 60, "10 $minutes"), From 174b2ac8034ea9e940c2371e9b0ff271aa4bc2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:41:25 +0200 Subject: [PATCH 08/11] Use more sensible values for sleep timer This also changes all of these items to use `getQuantityString` instead of manually appending values. --- .../flashlight/activities/MainActivity.kt | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt index 6572920..7f3170d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt @@ -304,32 +304,13 @@ class MainActivity : SimpleActivity() { ) return } - val minutes = getString(R.string.minutes_raw) - val hour = resources.getQuantityString(R.plurals.hours, 1, 1) - val minute = resources.getQuantityString(R.plurals.minutes, 1, 1) - val items = arrayListOf( - RadioItem(1 * 60, "1 $minute"), - RadioItem(2 * 60, "2 $minutes"), - RadioItem(5 * 60, "5 $minutes"), - RadioItem(10 * 60, "10 $minutes"), - RadioItem(20 * 60, "20 $minutes"), - RadioItem(30 * 60, "30 $minutes"), - RadioItem(60 * 60, hour) - ) + val items = ArrayList(listOf(10, 30, 60, 5 * 60, 10 * 60, 30 * 60).map { + RadioItem(it, secondsToString(it)) + }) if (items.none { it.id == config.lastSleepTimerSeconds }) { - val lastSleepTimerMinutes = config.lastSleepTimerSeconds / 60 - val lastSleepTimerSeconds = config.lastSleepTimerSeconds % 60 - val parts = mutableListOf() - if (lastSleepTimerMinutes != 0) { - parts.add(resources.getQuantityString(R.plurals.minutes, lastSleepTimerMinutes, lastSleepTimerMinutes)) - } - if (lastSleepTimerSeconds != 0) { - parts.add(resources.getQuantityString(R.plurals.seconds, lastSleepTimerSeconds, lastSleepTimerSeconds)) - } - val text = parts.joinToString(separator = " ") - items.add(RadioItem(config.lastSleepTimerSeconds, text)) + items.add(RadioItem(config.lastSleepTimerSeconds, secondsToString(config.lastSleepTimerSeconds))) } items.sortBy { it.id } @@ -348,6 +329,23 @@ class MainActivity : SimpleActivity() { } } + private fun secondsToString(seconds: Int): String { + val finalHours = seconds / 3600 + val finalMinutes = (seconds / 60) % 60 + val finalSeconds = seconds % 60 + val parts = mutableListOf() + if (finalHours != 0) { + parts.add(resources.getQuantityString(R.plurals.hours, finalHours, finalHours)) + } + if (finalMinutes != 0) { + parts.add(resources.getQuantityString(R.plurals.minutes, finalMinutes, finalMinutes)) + } + if (finalSeconds != 0) { + parts.add(resources.getQuantityString(R.plurals.seconds, finalSeconds, finalSeconds)) + } + return parts.joinToString(separator = " ") + } + private fun pickedSleepTimer(seconds: Int) { config.lastSleepTimerSeconds = seconds config.sleepInTS = System.currentTimeMillis() + seconds * 1000 From 77c8d50cf4a79277eb9d63274f52d4716fa69680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:49:22 +0200 Subject: [PATCH 09/11] Close app when timer runs out on BrightDisplayActivity --- .../flashlight/activities/BrightDisplayActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt index 0731a4e..05f870f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt @@ -13,6 +13,7 @@ import com.simplemobiletools.flashlight.models.Events import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode +import kotlin.system.exitProcess class BrightDisplayActivity : SimpleActivity() { private val binding by viewBinding(ActivityBrightDisplayBinding::inflate) @@ -104,7 +105,7 @@ class BrightDisplayActivity : SimpleActivity() { binding.sleepTimerHolder.beVisible() if (event.seconds == 0) { - finish() + exitProcess(0) } } } From da0b5d341c180e5503832abab6faebf15441f70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:57:20 +0200 Subject: [PATCH 10/11] Offset sleep-timer on BrightDisplayActivity from navigationBar --- .../flashlight/activities/BrightDisplayActivity.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt index 05f870f..4ab6945 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt @@ -4,6 +4,7 @@ import android.content.pm.ActivityInfo import android.graphics.drawable.ColorDrawable import android.os.Bundle import android.view.WindowManager +import android.widget.RelativeLayout import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.flashlight.databinding.ActivityBrightDisplayBinding @@ -58,6 +59,8 @@ class BrightDisplayActivity : SimpleActivity() { window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) toggleBrightness(true) requestedOrientation = if (config.forcePortraitMode) ActivityInfo.SCREEN_ORIENTATION_PORTRAIT else ActivityInfo.SCREEN_ORIENTATION_SENSOR + + (binding.sleepTimerHolder.layoutParams as RelativeLayout.LayoutParams).bottomMargin = navigationBarHeight } override fun onPause() { From e73737f2c41ad1a137bd671deaccfe43cf771789 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Wed, 6 Sep 2023 21:55:58 +0200 Subject: [PATCH 11/11] renaming some parameters --- .../simplemobiletools/flashlight/helpers/ShutDownReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt index 9fac360..8e64d39 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/ShutDownReceiver.kt @@ -6,7 +6,7 @@ import android.content.Intent import kotlin.system.exitProcess class ShutDownReceiver : BroadcastReceiver() { - override fun onReceive(p0: Context?, p1: Intent?) { + override fun onReceive(context: Context?, intent: Intent?) { exitProcess(0) } }