From 772ffb21ad0cfc93a39b2ff3dd43150420c40195 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Fri, 25 Nov 2022 07:11:41 +0000 Subject: [PATCH] add camera timer --- .../camera/activities/MainActivity.kt | 117 ++++++++++++++++-- .../camera/helpers/Config.kt | 5 + .../camera/helpers/Constants.kt | 1 + .../camera/helpers/MediaActionSound.kt | 1 + .../camera/helpers/MediaSoundHelper.kt | 4 + .../camera/implementations/CameraXPreview.kt | 29 +++-- .../implementations/CameraXPreviewListener.kt | 3 +- .../camera/interfaces/MyPreview.kt | 2 + .../camera/models/TimerMode.kt | 28 +++++ .../main/res/drawable/ic_shutter_animated.xml | 13 ++ .../res/drawable/ic_shutter_timer_cancel.xml | 20 +++ .../main/res/drawable/ic_timer_10_vector.xml | 15 +++ .../main/res/drawable/ic_timer_3_vector.xml | 12 ++ .../main/res/drawable/ic_timer_5_vector.xml | 12 ++ .../main/res/drawable/ic_timer_off_vector.xml | 18 +++ .../shutter_pressed_to_timer_cancel.xml | 19 +++ app/src/main/res/layout/activity_main.xml | 11 ++ app/src/main/res/layout/layout_timer.xml | 45 +++++++ app/src/main/res/layout/layout_top.xml | 25 ++-- app/src/main/res/layout/timer_text.xml | 14 +++ 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 | 3 +- 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 | 3 +- app/src/main/res/values-el/strings.xml | 1 + 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 | 1 + 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 | 1 + app/src/main/res/values-in/strings.xml | 3 +- app/src/main/res/values-it/strings.xml | 3 +- app/src/main/res/values-iw/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 3 +- app/src/main/res/values-ko/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-nb-rNO/strings.xml | 1 + app/src/main/res/values-ne/strings.xml | 1 + app/src/main/res/values-nl/strings.xml | 3 +- app/src/main/res/values-pa-rPK/strings.xml | 3 +- app/src/main/res/values-pl/strings.xml | 3 +- 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 | 3 +- 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 | 3 +- app/src/main/res/values-uk/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 3 +- app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/attrs.xml | 2 + app/src/main/res/values/dimens.xml | 1 + app/src/main/res/values/strings.xml | 1 + 67 files changed, 426 insertions(+), 52 deletions(-) create mode 100644 app/src/main/kotlin/com/simplemobiletools/camera/models/TimerMode.kt create mode 100644 app/src/main/res/drawable/ic_shutter_timer_cancel.xml create mode 100644 app/src/main/res/drawable/ic_timer_10_vector.xml create mode 100644 app/src/main/res/drawable/ic_timer_3_vector.xml create mode 100644 app/src/main/res/drawable/ic_timer_5_vector.xml create mode 100644 app/src/main/res/drawable/ic_timer_off_vector.xml create mode 100644 app/src/main/res/drawable/shutter_pressed_to_timer_cancel.xml create mode 100644 app/src/main/res/layout/layout_timer.xml create mode 100644 app/src/main/res/layout/timer_text.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index 15691056..b2f896eb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -8,6 +8,7 @@ import android.graphics.Bitmap import android.hardware.SensorManager import android.net.Uri import android.os.Bundle +import android.os.CountDownTimer import android.provider.MediaStore import android.view.* import android.widget.LinearLayout @@ -33,15 +34,17 @@ import com.simplemobiletools.camera.implementations.CameraXInitializer import com.simplemobiletools.camera.implementations.CameraXPreviewListener import com.simplemobiletools.camera.interfaces.MyPreview import com.simplemobiletools.camera.models.ResolutionOption +import com.simplemobiletools.camera.models.TimerMode import com.simplemobiletools.camera.views.FocusCircleView import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.commons.models.Release -import kotlinx.android.synthetic.main.activity_main.* -import kotlinx.android.synthetic.main.layout_flash.* -import kotlinx.android.synthetic.main.layout_top.* import java.util.concurrent.TimeUnit import kotlin.math.abs +import kotlinx.android.synthetic.main.activity_main.* +import kotlinx.android.synthetic.main.layout_flash.* +import kotlinx.android.synthetic.main.layout_timer.* +import kotlinx.android.synthetic.main.layout_top.* class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, CameraXPreviewListener { private companion object { @@ -53,6 +56,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera private lateinit var defaultScene: Scene private lateinit var flashModeScene: Scene + private lateinit var timerScene: Scene private lateinit var mOrientationEventListener: OrientationEventListener private lateinit var mFocusCircleView: FocusCircleView private var mPreview: MyPreview? = null @@ -60,6 +64,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera private var mPreviewUri: Uri? = null private var mIsHardwareShutterHandled = false private var mLastHandledOrientation = 0 + private var countDownTimer: CountDownTimer? = null private val tabSelectedListener = object : TabSelectedListener { override fun onTabSelected(tab: TabLayout.Tab) { @@ -140,7 +145,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera val isInPhotoMode = isInPhotoMode() setupPreviewImage(isInPhotoMode) mFocusCircleView.setStrokeColor(getProperPrimaryColor()) - toggleBottomButtons(enabled = true) + toggleActionButtons(enabled = true) mOrientationEventListener.enable() } @@ -155,6 +160,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera override fun onPause() { super.onPause() window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + cancelTimer() if (!hasStorageAndCameraPermissions() || isAskingPermissions) { return } @@ -283,6 +289,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera initModeSwitcher() defaultScene = Scene(top_options, default_icons) flashModeScene = Scene(top_options, flash_toggle_group) + timerScene = Scene(top_options, timer_toggle_group) WindowCompat.setDecorFitsSystemWindows(window, false) ViewCompat.setOnApplyWindowInsetsListener(view_holder) { _, windowInsets -> @@ -323,6 +330,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera setupPreviewImage(true) initFlashModeTransitionNames() + initTimerModeTransitionNames() if (isThirdPartyIntent) { hideIntentButtons() @@ -337,10 +345,26 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera flash_always_on.transitionName = "$baseName$FLASH_ALWAYS_ON" } + private fun initTimerModeTransitionNames() { + val baseName = getString(R.string.toggle_timer) + timer_off.transitionName = "$baseName${TimerMode.OFF.name}" + timer_3s.transitionName = "$baseName${TimerMode.TIMER_3.name}" + timer_5s.transitionName = "$baseName${TimerMode.TIMER_5.name}" + timer_10_s.transitionName = "$baseName${TimerMode.TIMER_10.name}" + } + private fun initButtons() { + timer_text.setFactory { layoutInflater.inflate(R.layout.timer_text, null) } toggle_camera.setOnClickListener { mPreview!!.toggleFrontBackCamera() } last_photo_video_preview.setOnClickListener { showLastMediaPreview() } toggle_flash.setOnClickListener { mPreview!!.handleFlashlightClick() } + toggle_timer.setOnClickListener { + val transitionSet = createTransition() + TransitionManager.go(timerScene, transitionSet) + timer_toggle_group.beVisible() + timer_toggle_group.check(config.timerMode.getTimerModeResId()) + timer_toggle_group.children.forEach { setButtonColors(it as MaterialButton) } + } shutter.setOnClickListener { shutterPressed() } settings.setShadowIcon(R.drawable.ic_settings_vector) @@ -359,6 +383,30 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera flash_always_on.setShadowIcon(R.drawable.ic_flashlight_vector) flash_always_on.setOnClickListener { selectFlashMode(FLASH_ALWAYS_ON) } + + timer_off.setShadowIcon(R.drawable.ic_timer_off_vector) + timer_off.setOnClickListener { selectTimerMode(TimerMode.OFF) } + + timer_3s.setShadowIcon(R.drawable.ic_timer_3_vector) + timer_3s.setOnClickListener { selectTimerMode(TimerMode.TIMER_3) } + + timer_5s.setShadowIcon(R.drawable.ic_timer_5_vector) + timer_5s.setOnClickListener { selectTimerMode(TimerMode.TIMER_5) } + + timer_10_s.setShadowIcon(R.drawable.ic_timer_10_vector) + timer_10_s.setOnClickListener { selectTimerMode(TimerMode.TIMER_10) } + setTimerModeIcon(config.timerMode) + } + + private fun selectTimerMode(timerMode: TimerMode) { + config.timerMode = timerMode + setTimerModeIcon(timerMode) + closeOptions() + } + + private fun setTimerModeIcon(timerMode: TimerMode) { + toggle_timer.setShadowIcon(timerMode.getTimerModeDrawableRes()) + toggle_timer.transitionName = "${getString(R.string.toggle_timer)}${timerMode.name}" } @SuppressLint("ClickableViewAccessibility") @@ -426,15 +474,26 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera } private fun shutterPressed() { - if (isInPhotoMode()) { - toggleBottomButtons(enabled = false) - change_resolution.isEnabled = true - mPreview?.tryTakePicture() + if (countDownTimer != null) { + cancelTimer() + } else if (isInPhotoMode()) { + val timerMode = config.timerMode + if (timerMode == TimerMode.OFF) { + mPreview?.tryTakePicture() + } else { + scheduleTimer(timerMode) + } } else { mPreview?.toggleRecording() } } + private fun cancelTimer() { + countDownTimer?.cancel() + countDownTimer = null + resetViewsOnTimerFinish() + } + private fun launchSettings() { val intent = Intent(applicationContext, SettingsActivity::class.java) startActivity(intent) @@ -442,12 +501,16 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera override fun onInitPhotoMode() { shutter.setImageResource(R.drawable.ic_shutter_animated) + toggle_timer.beVisible() + toggle_timer.fadeIn() setupPreviewImage(true) selectPhotoTab() } override fun onInitVideoMode() { shutter.setImageResource(R.drawable.ic_video_rec_animated) + toggle_timer.fadeOut() + toggle_timer.beGone() setupPreviewImage(false) selectVideoTab() } @@ -556,10 +619,19 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera toggle_camera.setImageResource(if (frontCamera) R.drawable.ic_camera_rear_vector else R.drawable.ic_camera_front_vector) } - override fun toggleBottomButtons(enabled: Boolean) { + override fun onPhotoCaptureStart() { + toggleActionButtons(enabled = false) + } + + override fun onPhotoCaptureEnd() { + toggleActionButtons(enabled = true) + } + + private fun toggleActionButtons(enabled: Boolean) { runOnUiThread { shutter.isClickable = enabled preview_view.isEnabled = enabled + change_resolution.isEnabled = enabled toggle_camera.isClickable = enabled toggle_flash.isClickable = enabled } @@ -656,12 +728,13 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera private fun closeOptions(): Boolean { if (mediaSizeToggleGroup?.isVisible() == true || - flash_toggle_group.isVisible() + flash_toggle_group.isVisible() || timer_toggle_group.isVisible() ) { val transitionSet = createTransition() TransitionManager.go(defaultScene, transitionSet) mediaSizeToggleGroup?.beGone() flash_toggle_group.beGone() + timer_toggle_group.beGone() default_icons.beVisible() return true } @@ -768,6 +841,30 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera } } + private fun scheduleTimer(timerMode: TimerMode) { + top_options.fadeOut() + shutter.setImageState(intArrayOf(R.attr.state_timer_cancel), true) + timer_text.beVisible() + countDownTimer = object : CountDownTimer(timerMode.millisInFuture, 1000) { + override fun onTick(millisUntilFinished: Long) { + mPreview!!.toggleFlash() + val seconds = (TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) + 1).toString() + timer_text.setText(seconds) + } + + override fun onFinish() { + cancelTimer() + mPreview!!.tryTakePicture() + } + }.start() + } + + private fun resetViewsOnTimerFinish() { + top_options.fadeIn() + timer_text.beGone() + shutter.setImageState(intArrayOf(-R.attr.state_timer_cancel), true) + } + private fun checkWhatsNewDialog() { arrayListOf().apply { add(Release(33, R.string.release_33)) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt index 98728de1..01b80789 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Config.kt @@ -4,6 +4,7 @@ import android.content.Context import android.os.Environment import androidx.camera.core.CameraSelector import com.simplemobiletools.camera.models.CaptureMode +import com.simplemobiletools.camera.models.TimerMode import com.simplemobiletools.commons.helpers.BaseConfig import java.io.File @@ -75,4 +76,8 @@ class Config(context: Context) : BaseConfig(context) { get() = CaptureMode.values()[prefs.getInt(CAPTURE_MODE, CaptureMode.MINIMIZE_LATENCY.ordinal)] set(captureMode) = prefs.edit().putInt(CAPTURE_MODE, captureMode.ordinal).apply() + var timerMode: TimerMode + get() = TimerMode.values().getOrNull(prefs.getInt(TIMER_MODE, TimerMode.OFF.ordinal)) ?: TimerMode.OFF + set(timerMode) = prefs.edit().putInt(TIMER_MODE, timerMode.ordinal).apply() + } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt index d3c075e0..2850e250 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/Constants.kt @@ -20,6 +20,7 @@ const val FRONT_VIDEO_RESOLUTION_INDEX = "front_video_resolution_index_3" const val SAVE_PHOTO_METADATA = "save_photo_metadata" const val PHOTO_QUALITY = "photo_quality" const val CAPTURE_MODE = "capture_mode" +const val TIMER_MODE = "timer_mode" const val FLASH_OFF = 0 const val FLASH_ON = 1 diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaActionSound.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaActionSound.kt index 79357deb..a8ac8dda 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaActionSound.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaActionSound.kt @@ -28,6 +28,7 @@ class MediaActionSound(private val context: Context) { ) private const val TAG = "MediaActionSound" const val SHUTTER_CLICK = 0 + const val FOCUS_COMPLETE = 1 const val START_VIDEO_RECORDING = 2 const val STOP_VIDEO_RECORDING = 3 private const val STATE_NOT_LOADED = 0 diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaSoundHelper.kt b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaSoundHelper.kt index 1e32a822..988880dc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaSoundHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/helpers/MediaSoundHelper.kt @@ -23,6 +23,10 @@ class MediaSoundHelper(context: Context) { mediaActionSound.play(MediaActionSound.STOP_VIDEO_RECORDING) } + fun playFocusCompleteSound() { + mediaActionSound.play(MediaActionSound.FOCUS_COMPLETE) + } + fun release() { mediaActionSound.release() } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt index 3025b7fb..3743a60e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreview.kt @@ -29,10 +29,8 @@ import com.simplemobiletools.camera.R import com.simplemobiletools.camera.extensions.* import com.simplemobiletools.camera.helpers.* import com.simplemobiletools.camera.interfaces.MyPreview +import com.simplemobiletools.camera.models.* import com.simplemobiletools.camera.models.CaptureMode -import com.simplemobiletools.camera.models.MediaOutput -import com.simplemobiletools.camera.models.MySize -import com.simplemobiletools.camera.models.ResolutionOption import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.helpers.ensureBackgroundThread @@ -51,6 +49,7 @@ class CameraXPreview( private const val AF_SIZE = 1.0f / 6.0f private const val AE_SIZE = AF_SIZE * 1.5f private const val CAMERA_MODE_SWITCH_WAIT_TIME = 500L + private const val TOGGLE_FLASH_DELAY = 700L } private val config = activity.config @@ -85,7 +84,7 @@ class CameraXPreview( } } } - private val startCameraHandler = Handler(Looper.getMainLooper()) + private val cameraHandler = Handler(Looper.getMainLooper()) private val photoModeRunnable = Runnable { if (imageCapture == null) { isPhotoCapture = true @@ -466,6 +465,16 @@ class CameraXPreview( listener.onChangeFlashMode(flashState) } + override fun toggleFlash() { + if (config.isSoundEnabled) { + mediaSoundHelper.playFocusCompleteSound() + } + camera?.cameraControl?.enableTorch(true) + cameraHandler.postDelayed({ + camera?.cameraControl?.enableTorch(false) + }, TOGGLE_FLASH_DELAY) + } + override fun tryTakePicture() { val imageCapture = imageCapture ?: throw IllegalStateException("Camera initialization failed.") @@ -484,7 +493,7 @@ class CameraXPreview( val imageBytes = ImageUtil.jpegImageToJpegByteArray(image) val bitmap = BitmapUtils.makeBitmap(imageBytes) activity.runOnUiThread { - listener.toggleBottomButtons(enabled = true) + listener.onPhotoCaptureEnd() if (bitmap != null) { listener.onImageCaptured(bitmap) } else { @@ -501,7 +510,7 @@ class CameraXPreview( saveExifAttributes = config.savePhotoMetadata, onImageSaved = { savedUri -> activity.runOnUiThread { - listener.toggleBottomButtons(enabled = true) + listener.onPhotoCaptureEnd() listener.onMediaSaved(savedUri) } }, @@ -519,7 +528,7 @@ class CameraXPreview( } private fun handleImageCaptureError(exception: ImageCaptureException) { - listener.toggleBottomButtons(enabled = true) + listener.onPhotoCaptureEnd() cameraErrorHandler.handleImageCaptureError(exception.imageCaptureError) } @@ -536,9 +545,9 @@ class CameraXPreview( if (currentTime - lastCameraStartTime > CAMERA_MODE_SWITCH_WAIT_TIME) { cameraModeRunnable.run() } else { - startCameraHandler.removeCallbacks(photoModeRunnable) - startCameraHandler.removeCallbacks(videoModeRunnable) - startCameraHandler.postDelayed(cameraModeRunnable, CAMERA_MODE_SWITCH_WAIT_TIME) + cameraHandler.removeCallbacks(photoModeRunnable) + cameraHandler.removeCallbacks(videoModeRunnable) + cameraHandler.postDelayed(cameraModeRunnable, CAMERA_MODE_SWITCH_WAIT_TIME) } lastCameraStartTime = currentTime } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreviewListener.kt b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreviewListener.kt index 5c9f1866..1abcc617 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreviewListener.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/implementations/CameraXPreviewListener.kt @@ -11,11 +11,12 @@ interface CameraXPreviewListener { fun setHasFrontAndBackCamera(hasFrontAndBack: Boolean) fun setFlashAvailable(available: Boolean) fun onChangeCamera(frontCamera: Boolean) - fun toggleBottomButtons(enabled: Boolean) fun shutterAnimation() fun onMediaSaved(uri: Uri) fun onImageCaptured(bitmap: Bitmap) fun onChangeFlashMode(flashMode: Int) + fun onPhotoCaptureStart() + fun onPhotoCaptureEnd() fun onVideoRecordingStarted() fun onVideoRecordingStopped() fun onVideoDurationChanged(durationNanos: Long) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/interfaces/MyPreview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/interfaces/MyPreview.kt index f3b770a8..639f409c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/interfaces/MyPreview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/interfaces/MyPreview.kt @@ -19,4 +19,6 @@ interface MyPreview { fun initVideoMode() fun showChangeResolution() + + fun toggleFlash() } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/models/TimerMode.kt b/app/src/main/kotlin/com/simplemobiletools/camera/models/TimerMode.kt new file mode 100644 index 00000000..bdbbe5e0 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/camera/models/TimerMode.kt @@ -0,0 +1,28 @@ +package com.simplemobiletools.camera.models + +import com.simplemobiletools.camera.R + +enum class TimerMode(val millisInFuture: Long) { + OFF(0), + TIMER_3(3000), + TIMER_5(5000), + TIMER_10(10000); + + fun getTimerModeResId(): Int { + return when (this) { + OFF -> R.id.timer_off + TIMER_3 -> R.id.timer_3s + TIMER_5 -> R.id.timer_5s + TIMER_10 -> R.id.timer_10_s + } + } + + fun getTimerModeDrawableRes(): Int { + return when (this) { + OFF -> R.drawable.ic_timer_off_vector + TIMER_3 -> R.drawable.ic_timer_3_vector + TIMER_5 -> R.drawable.ic_timer_5_vector + TIMER_10 -> R.drawable.ic_timer_10_vector + } + } +} diff --git a/app/src/main/res/drawable/ic_shutter_animated.xml b/app/src/main/res/drawable/ic_shutter_animated.xml index 42081bc9..174a5d3e 100644 --- a/app/src/main/res/drawable/ic_shutter_animated.xml +++ b/app/src/main/res/drawable/ic_shutter_animated.xml @@ -1,13 +1,21 @@ + + + + @@ -21,4 +29,9 @@ android:drawable="@drawable/shutter_unpressed_to_pressed" android:fromId="@id/unpressed" android:toId="@id/pressed" /> + + diff --git a/app/src/main/res/drawable/ic_shutter_timer_cancel.xml b/app/src/main/res/drawable/ic_shutter_timer_cancel.xml new file mode 100644 index 00000000..794114b4 --- /dev/null +++ b/app/src/main/res/drawable/ic_shutter_timer_cancel.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_timer_10_vector.xml b/app/src/main/res/drawable/ic_timer_10_vector.xml new file mode 100644 index 00000000..c57f5766 --- /dev/null +++ b/app/src/main/res/drawable/ic_timer_10_vector.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_timer_3_vector.xml b/app/src/main/res/drawable/ic_timer_3_vector.xml new file mode 100644 index 00000000..5f83541d --- /dev/null +++ b/app/src/main/res/drawable/ic_timer_3_vector.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_timer_5_vector.xml b/app/src/main/res/drawable/ic_timer_5_vector.xml new file mode 100644 index 00000000..263173f7 --- /dev/null +++ b/app/src/main/res/drawable/ic_timer_5_vector.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_timer_off_vector.xml b/app/src/main/res/drawable/ic_timer_off_vector.xml new file mode 100644 index 00000000..5b78f7c3 --- /dev/null +++ b/app/src/main/res/drawable/ic_timer_off_vector.xml @@ -0,0 +1,18 @@ + + + + + + diff --git a/app/src/main/res/drawable/shutter_pressed_to_timer_cancel.xml b/app/src/main/res/drawable/shutter_pressed_to_timer_cancel.xml new file mode 100644 index 00000000..865d7fe4 --- /dev/null +++ b/app/src/main/res/drawable/shutter_pressed_to_timer_cancel.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 91e32770..5d38d5a2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -32,8 +32,19 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/layout_top.xml b/app/src/main/res/layout/layout_top.xml index 8321b032..dc05e15f 100644 --- a/app/src/main/res/layout/layout_top.xml +++ b/app/src/main/res/layout/layout_top.xml @@ -7,6 +7,16 @@ android:layout_height="wrap_content" android:orientation="horizontal"> + + + app:icon="@drawable/ic_flash_off_vector" /> + app:icon="@drawable/ic_settings_vector" /> diff --git a/app/src/main/res/layout/timer_text.xml b/app/src/main/res/layout/timer_text.xml new file mode 100644 index 00000000..9333cfb6 --- /dev/null +++ b/app/src/main/res/layout/timer_text.xml @@ -0,0 +1,14 @@ + + diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index f2cd1ac7..f1da9926 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -28,6 +28,7 @@ عرض آخر الوسائط الملتقطة تبديل الكاميرا الأمامية / الخلفية تبديل وضع الفلاش اليدوي + Toggle the timer mode ما هي جودة ضغط الصور التي يجب تعيينها؟ ذلك يعتمد على هدفك. لأغراض عامة ينصح معظم الناس باستخدام 75٪ -80٪، عندما تكون الصورة لا تزال ذات نوعية جيدة حقا، ولكن يتم تقليل حجم الملف بشكل كبير مقارنة مع 100٪. @@ -52,4 +53,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 39015003..24fca8d0 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode Şəkli hansı keyfiyyətdə yaddaşa salmalıyam? diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml index 8ae71a4e..ea3a9fc1 100644 --- a/app/src/main/res/values-be/strings.xml +++ b/app/src/main/res/values-be/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode Якую якасць сціску фатаграфій трэба ўсталяваць\? Гэта залежыць ад вашай мэты. Для агульных мэтаў большасць людзей раяць выкарыстоўваць 75% -80%, калі малюнак па-ранейшаму сапраўды добрага якасці, але Памер файла рэзка памяншаецца ў параўнанні са 100%. diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index ea0d6787..134cbc34 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -28,6 +28,7 @@ Преглед на последно заснети медии Превключване на предна/задна камера Превключване на режим фенерче + Toggle the timer mode Колко трябва да компресирам качеството на снимките\? Зависи. За общо ползване повечето хора съветват да 75%-80%, като изображението все още е с наистина добро качество, но размерът на файла е драстично намален в сравнение със 100%. diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index 9b49f0be..56e46084 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -28,6 +28,7 @@ Visualitza el darrer contingut multimèdia capturat Commuta la càmera frontal/posterior Commuta el mode de la llum de flaix + Toggle the timer mode Quina qualitat de compressió fotogràfica he d\'establir\? Depèn del vostre objectiu. Amb finalitats genèriques, la majoria de la gent aconsella utilitzar un 75%-80%, quan la imatge encara és de molt bona qualitat, però la mida del fitxer es redueix dràsticament en comparació amb el 100%. @@ -52,4 +53,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 b3bcde0f..cb743076 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -28,6 +28,7 @@ Zobrazit poslední pořízený snímek Přepnout přední/zadní fotoaparát Přepnout režim blesku + Toggle the timer mode Jakou úroveň komprese fotografií bych měl nastavit\? To záleží na vašem záměru. Pro obecné účely doporučuje většina lidí 75%–80%, kdy je kvalita fotografií stále vysoká, ale výsledný soubor má o mnoho menší velikost v porovnání se 100% kvalitou. diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 9eaae1e6..bc4ac0bf 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode Pa ansawdd cywasgu llun dylwn ei osod? diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 0e0c5947..ff5985a8 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode Hvilken fotokomprimeringskvalitet skal jeg anvende\? Det afhænger af dit mål. Til almindelige formål anbefaler de fleste at bruge 75-80 %, hvor billedet stadig har en rigtig god kvalitet, men hvor filstørrelsen er reduceret drastisk i forhold til 100 %. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 606a5d68..6b0ca602 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -28,6 +28,7 @@ Zuletzt erfasste Medien anzeigen Zwischen Front- und Rückkamera umschalten Taschenlampenmodus umschalten + Toggle the timer mode Was für eine Fotokomprimierungsqualität soll ich einstellen? Das hängt von deinem Ziel ab. Für allgemeine Zwecke empfehlen die meisten 75 - 80 %, wodurch die Qualität immer noch sehr gut bleibt, aber die Dateigrösse drastisch reduziert ist im Vergleich zu 100 %. @@ -52,4 +53,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 2125eb44..fd8e22e0 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -29,6 +29,7 @@ Προβολή των τελευταίων αποθηκευμένων πολυμέσων Εναλλαγή εμπρός/πίσω κάμερας Εναλλαγή λειτουργίας φακού + Toggle the timer mode Ποια ποιότητα συμπίεσης φωτογραφιών πρέπει να ορίσω; diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index 761a87c4..ab3e78f9 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode What photo compression quality should I set? It depends on your goal. For generic purposes most people advise using 75%-80%, when the image is still really good quality, but the file size is reduced drastically compared to 100%. @@ -52,4 +53,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 054406b9..0700c988 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -28,6 +28,7 @@ Ver últimos archivos capturados Cambiar cámara frontal/trasera Cambiar a modo linterna + Toggle the timer mode ¿Qué calidad de compresión de foto debería establecer? Depende de tu objetivo. Para propósitos generales, la mayoría de las personas aconsejan usar 75%-80%, y la imagen seguirá siendo de calidad realmente buena, pero el tamaño del archivo es reducido drásticamente comparado con el 100%. @@ -52,4 +53,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 b3a6b4f6..f25b6f9f 100644 --- a/app/src/main/res/values-et/strings.xml +++ b/app/src/main/res/values-et/strings.xml @@ -28,6 +28,7 @@ Vaadake viimast salvestatud meediat Vahetamine esi-/tagakaamera Lülitage taskulambi režiim sisse + Toggle the timer mode Missugust piltide pakkimise kvaliteeti peaksin kasutama\? See sõltub sinu eesmärkidest. Üldiselt soovitame 75-80-protsendilist pakkimist, mispuhul piltide kvaliteet on jätkuvalt mõistlik, kuid piltide suurus on 100-protsendilise kvaliteediga võrreldes väiksem. @@ -52,4 +53,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 ec62f688..1f03a13d 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -28,6 +28,7 @@ Näytä viimeksi kaapattu media Vaihda etu-/takakameraa Vaihda taskulampputilaa + Toggle the timer mode Mitä valokuvan pakkauslaatua minun pitäisi käyttää? Se riippuu tarkoituksestasi. Yleisissä tarkoituksissa useimmat ihmiset suosittelevat käyttämään 75-80%, kun kuva on edelleen todella hyvälaatuinen, mutta tiedoston koko pienenee huomattavasti verrattuna 100%:iin. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index cf10fd0e..07f3bc5d 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -28,6 +28,7 @@ Afficher les derniers médias capturés Basculer la caméra avant/arrière Activer/désactiver le mode lampe de poche + Toggle the timer mode Quelle valeur devrais-je mettre pour la qualité des photos \? Tout dépend de ce que vous voulez en faire. Pour la plupart des usages, il est recommandé entre 75 et 80 %, ce qui est reste de qualité acceptable, tout en générant un fichier de taille bien inférieure à une photo avec une qualité de 100 %. @@ -52,4 +53,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 58251e5b..3c33e6db 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -28,6 +28,7 @@ Ollalos derradeiros medios capturados Troca entre a cámara frontal/traseira Troca a modo lanterna + Toggle the timer mode Que calidade de compresión debo escoller para a foto? Depende do obxectivo. Para uso xeral a maioría das persoas usuarias recomendan entre un 75%-80%, que é un valor bastante bo, pero o tamaño do ficheiro redúcese drasticamente comparado co 100%. @@ -52,4 +53,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 2ae6c64b..ac66bb70 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -28,6 +28,7 @@ Pogledaj zadnje snimljeni medij Uklj./Isklj. prednju/stražnju kameru Uklj./Isklj. modus svjetiljke + Toggle the timer mode Koju kvalitetu kompresije fotografija trebam postaviti\? Ovisi o tvom cilju. Za opće namjene, većina ljudi savjetuje korištenje 75 do 80 % kad je slika dobre kvalitete, ali se veličina datoteke drastično smanjuje u usporedbi sa 100 %. @@ -52,4 +53,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 ce2454fd..a780b09d 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -28,6 +28,7 @@ Utoljára rögzített média megtekintése Elülső/hátsó kamera átkapcsolása A zseblámpa üzemmód váltása + Toggle the timer mode Milyen fotótömörítési minőséget kell beállítanom\? Ez a céltól függ. Általános célokra a legtöbben 75%-80%-ot javasolnak, amikor a kép még mindig nagyon jó minőségű, de a fájlméret drasztikusan csökken a 100%-hoz képest. diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 0b2682aa..7c40c667 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -28,6 +28,7 @@ Lihat media yang terakhir kali ditangkap Ubah kamera depan/belakang Saklar mode senter + Toggle the timer mode Kualitas kompresi foto mana yang harus saya gunakan? Tergantung tujuan anda. Untuk hal-hal yang umum direkomendasikan menggunakan 75%-80%, kualitas gambar masih sangat bagus, tetapi ukuran berkas berkurang signifikan dibandingkan dengan 100%. @@ -52,4 +53,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-it/strings.xml b/app/src/main/res/values-it/strings.xml index b30cf92a..1efc5e4f 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -28,6 +28,7 @@ Visualizza gli ultimi media acquisiti Alterna fotocamera anteriore/posteriore Attiva la modalità torcia + Toggle the timer mode Che qualità di compressione dovrei impostare? Dipende dal proprio obiettivo. In genere si consiglia di utilizzare una qualità del 75%-80%, in modo che l\'immagine sia ancora di ottima qualità, ma la dimensione del file viene ridotta drasticamente rispetto al 100%. @@ -52,4 +53,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 7a9b1a60..75923b65 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode איזו איכות דחיסת תמונה עלי להגדיר\? diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index a51a34ec..89bbfe3a 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -28,6 +28,7 @@ 最後に撮影したメディアを表示 前面/背面カメラの切り替え フラッシュライトモードへ切り替え + Toggle the timer mode 写真の圧縮品質はどのように設定すればよいですか? これはあなたの求める目標によります。一般的な用途には、75%~80%の使用をおすすめします。この設定でも画像は十分に良い品質ですが、ファイルサイズは100%と比べて大幅に削減することができます。 @@ -52,4 +53,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/strings.xml b/app/src/main/res/values-ko/strings.xml index 2050e477..00668215 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode 사진 압축품질을 무엇으로 설정해야 하나요? 압축품질은 촬영용도에 따라 달라질 수 있지만, 일반적으로 75% -80%를 사용하도록 권고합니다. 75% -80%로 압축 품질을 설정하면 파일 크기는 100%에 비해 크게 줄어듭니다. diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 73be2659..af04ad58 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -28,6 +28,7 @@ Rodyti paskiausiai fiksuotą mediją Perjungti priekinę/galinę kamerą Perjungti žibintuvėlio veikseną + Toggle the timer mode Kokią nuotraukos glaudinimo kokybę turėčiau nustatyti\? Tai priklauso nuo jūsų tikslų. Įprastiems tikslams dauguma žmonių pataria naudoti 75%–80%, kuomet nuotrauka yra vis dar geros kokybės, bet failo dydis, palyginus su 100%, iš esmės sumažėja. diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml index 28f1fda3..d5fc96d3 100644 --- a/app/src/main/res/values-ml/strings.xml +++ b/app/src/main/res/values-ml/strings.xml @@ -28,6 +28,7 @@ അവസാനം പകർത്തിയ മീഡിയ കാണുക ഫ്രണ്ട്/ബാക്ക് ക്യാമറ ടോഗിൾ ചെയ്യുക ഫ്ലാഷ്‌ലൈറ്റ് മോഡ് ടോഗിൾ ചെയ്യുക + Toggle the timer mode ഏത് ഫോട്ടോ കംപ്രഷനാണ് ഞാൻ ഉപയോഗിക്കേണ്ടത്? അത് നിങ്ങളുടെ ആവശ്യകത ആശ്രയിച്ചിരിക്കുന്നു. പൊതുവായ ആവശ്യങ്ങൾക്കായി മിക്ക ആളുകളും 75%-80% ഉപയോഗിക്കാൻ ഉപദേശിക്കുന്നു, ചിത്രം ഇപ്പോഴും നല്ല ഗുണനിലവാരമാണ്, പക്ഷേ ഫയൽ വലുപ്പം 100% മായി താരതമ്യപ്പെടുത്തുമ്പോൾ ഗണ്യമായി കുറയുന്നു. diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 6e3864f0..64ef825d 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -28,6 +28,7 @@ Vis medier som ble tatt sist Veksle mellom front-/bakkamera Aktivere/deaktivere lommelykt modus + Toggle the timer mode Hvilket bildekomprimeringsnivå bør jeg bruke\? Det avhenger av hva du vil. Til alminnelige formål anbefales 75%-80%. Fremdeles god kvalitet, men vesentlig redusert filstørrelse sammenlignet med 100%. diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml index bf8428fe..1b950995 100644 --- a/app/src/main/res/values-ne/strings.xml +++ b/app/src/main/res/values-ne/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode मैले कस्तो फोटो खदाईको गुणस्तर स्थापित गर्नुपर्छ ? diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index b1ef10d8..b27af1a1 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -28,6 +28,7 @@ Laatste opname bekijken Camera voor/achter Zaklampmodus wisselen + Toggle the timer mode Welke kwaliteit voor foto\'s moet ik instellen? Voor normaal gebruik adviseren de meeste mensen een compressie van 75%-80%. De afbeelding zal dan nog steeds van goede kwaliteit zijn en de bestandsgrootte zal enorm veel kleiner zijn dan met 100%. @@ -52,4 +53,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 a6f6c3a2..72f831d6 100644 --- a/app/src/main/res/values-pa-rPK/strings.xml +++ b/app/src/main/res/values-pa-rPK/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode What photo compression quality should I set? It depends on your goal. For generic purposes most people advise using 75%-80%, when the image is still really good quality, but the file size is reduced drastically compared to 100%. @@ -48,4 +49,4 @@ ایکسیف میٹاڈیٹا سامبھو Photo compression quality Shutter - \ No newline at end of file + diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 4290da84..64b4fda9 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -28,6 +28,7 @@ Wyświetl ostatnio zrobiony plik Przełącz między przednim a tylnym aparatem Włącz lub wyłącz latarkę + Toggle the timer mode Jaką jakość kompresji zdjęć powinienem ustawić\? Zależy to od Twojego celu. Do celów ogólnych większość ludzi zaleca poziom 75-80% — wtedy obraz jest nadal w dobrej jakości, ale rozmiar pliku znacznie zmniejsza się w porównaniu do 100%. @@ -52,4 +53,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 b5ff344c..746f7637 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -28,6 +28,7 @@ Exibir a última mídia capturada Alternar câmera frontal/traseira Alternar o modo lanterna + Toggle the timer mode Que qualidade de compressão de imagem devo definir\? Depende de seu objetivo. Para fins genéricos, aconselha-se o uso de 75%-80%, no qual a imagem ainda apresenta boa qualidade, porém tamanho drasticamente reduzido em comparação a 100%. diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 3273cb0b..259f7560 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode What photo compression quality should I set? diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index fd2f52d6..66eda6cd 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -28,6 +28,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode Que qualidade de compressão de imagem devo definir? Depende de seu objetivo. Para fins genéricos, aconselha-se o uso de 75%-80%, no qual a imagem ainda apresenta boa qualidade, porém tamanho drasticamente reduzido em comparação a 100%. diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 6ba69593..46792b86 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -28,6 +28,7 @@ Vizualizați ultimul suport media capturat Comutarea camerei față/spate Comutatarea modului lanternă + Toggle the timer mode Ce calitate de compresie a fotografiilor ar trebui să setez? Depinde de obiectivul dumneavoastră. În general, majoritatea oamenilor recomandă utilizarea a 75%-80%, atunci când calitatea imaginii este foarte bună, dar dimensiunea fișierului este redusă drastic în comparație cu 100%. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 62379d3a..6e411bf7 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -28,6 +28,7 @@ Просмотр последнего снимка Переключить переднюю/заднюю камеру Переключить режим фонарика + Toggle the timer mode Какое качество сжатия фото нужно установить? Это зависит от вашей цели. В общем случае большинство людей советуют использовать 75%-80%, тогда изображение всё ещё действительно хорошего качества, но размер файла резко уменьшается по сравнению со 100%. @@ -52,4 +53,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 3620cc04..ac265dc7 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -29,6 +29,7 @@ Zobraziť posledný súbor Prepnúť prednú/zadnú kameru Prepnúť blesk + Toggle the timer mode Akú kvalitu fotiek by som mal použiť? diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 9d40e1c1..03e19780 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -28,6 +28,7 @@ Oglejte si najnovejše zajete medije Preklopite med sprednjo in zadnjo kamero Preklopite načina svetilke + Toggle the timer mode Kakšno kakovost stiskanja fotografij nastavim\? Odvisno od vašega cilja. Za splošne namene svetuje večina ljudi uporabo 75–80 %, ko je slika še vedno zelo dobre kakovosti, vendar se velikost datoteke drastično zmanjša v primerjavi s 100 % . diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 5f6e22fa..1f02ce19 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -28,6 +28,7 @@ Погледајте последње снимљене медије Укључите предњу/задњу камеру Укључите режим батеријске лампе + Toggle the timer mode Који квалитет компресије фотографија треба да поставим\? Зависи од вашег циља. За опште сврхе већина људи саветује коришћење 75%-80%, када је слика и даље стварно доброг квалитета, али је величина датотеке драстично смањена у поређењу са 100%. diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index dea6e7e6..9dfd7037 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -28,6 +28,7 @@ Visa de senast fångade medierna Växla mellan främre/bakre kamera Växla ficklampans läge + Toggle the timer mode Vilken kvalitet för fotokomprimering ska jag ställa in\? Det beror på ditt mål. För generiska ändamål rekommenderar de flesta att man använder 75-80 %, då bilden fortfarande har riktigt bra kvalitet, men filstorleken minskar drastiskt jämfört med 100 %. diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml index 4c4e37f1..38ddfc3e 100644 --- a/app/src/main/res/values-th/strings.xml +++ b/app/src/main/res/values-th/strings.xml @@ -30,6 +30,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode What photo compression quality should I set? diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index a3fd899b..ad3b8002 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -28,6 +28,7 @@ Son çekilen medyayı görüntüle Ön/arka kamerayı değiştir El feneri modunu değiştir + Toggle the timer mode Hangi fotoğraf sıkıştırma kalitesini ayarlamalıyım? Hedefinize bağlı. Genel amaçlar için çoğu kişi %75-%80\'i kullanmanızı önerir, görüntü hala gerçekten kaliteliyken, dosya boyutu %100\'e göre büyük ölçüde azalır. @@ -52,4 +53,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 38ebc74b..d2ee7133 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -28,6 +28,7 @@ Перегляд останньої знятки Перемкнути передній/задній знімач Перемкнути стан ліхтарика + Toggle the timer mode Який ступінь стиснення фото слід встановити? Це залежить від вашої мети. Загалом більшість людей радять використовувати 75%-80%, тоді зображення ще дійсно гарної якості, але розмір файлу істотно зменшується порівняно зі 100%. diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 6f14a807..2741498b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -28,6 +28,7 @@ 查看上次拍的媒体文件 切换前置/后置摄像头 切换闪光灯模式 + Toggle the timer mode 我应该选用怎样的照片压缩率呢? 这取决于您的目的。对大多数人的一般用途来说,建议使用 75%-80%,此时图片仍有不错的品质,而文件大小相比 100% 时大幅减小。 @@ -52,4 +53,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 f4318894..1672beea 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode 我應該設定什麼相片壓縮品質? diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 18b05c26..e8df1909 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -6,4 +6,6 @@ + + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 616eea55..8917a244 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -5,4 +5,5 @@ 48dp 24dp 10dp + 180sp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cae368c0..b6bd484c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ View last captured media Toggle front/back camera Toggle the flashlight mode + Toggle the timer mode What photo compression quality should I set?