mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-05 16:49:41 +02:00
removing the FocusBeforeCapture setting
This commit is contained in:
parent
b9dd068495
commit
16bed1a1b0
@ -28,7 +28,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
setupUseEnglish()
|
setupUseEnglish()
|
||||||
setupSound()
|
setupSound()
|
||||||
setupFocusBeforeCapture()
|
|
||||||
setupVolumeButtonsAsShutter()
|
setupVolumeButtonsAsShutter()
|
||||||
setupTurnFlashOffAtStartup()
|
setupTurnFlashOffAtStartup()
|
||||||
setupFlipPhotos()
|
setupFlipPhotos()
|
||||||
@ -101,7 +100,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
settings_use_english.isChecked = config.useEnglish
|
settings_use_english.isChecked = config.useEnglish
|
||||||
|
|
||||||
if (settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone()) {
|
if (settings_use_english_holder.isGone() && settings_purchase_thank_you_holder.isGone()) {
|
||||||
settings_keep_settings_visible_holder.background = resources.getDrawable(R.drawable.ripple_top_corners, theme)
|
settings_keep_settings_visible_holder.background = resources.getDrawable(R.drawable.ripple_all_corners, theme)
|
||||||
}
|
}
|
||||||
|
|
||||||
settings_use_english_holder.setOnClickListener {
|
settings_use_english_holder.setOnClickListener {
|
||||||
@ -136,14 +135,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupFocusBeforeCapture() {
|
|
||||||
settings_focus_before_capture.isChecked = config.focusBeforeCapture
|
|
||||||
settings_focus_before_capture_holder.setOnClickListener {
|
|
||||||
settings_focus_before_capture.toggle()
|
|
||||||
config.focusBeforeCapture = settings_focus_before_capture.isChecked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupVolumeButtonsAsShutter() {
|
private fun setupVolumeButtonsAsShutter() {
|
||||||
settings_volume_buttons_as_shutter.isChecked = config.volumeButtonsAsShutter
|
settings_volume_buttons_as_shutter.isChecked = config.volumeButtonsAsShutter
|
||||||
settings_volume_buttons_as_shutter_holder.setOnClickListener {
|
settings_volume_buttons_as_shutter_holder.setOnClickListener {
|
||||||
|
@ -25,10 +25,6 @@ class Config(context: Context) : BaseConfig(context) {
|
|||||||
get() = prefs.getBoolean(SOUND, true)
|
get() = prefs.getBoolean(SOUND, true)
|
||||||
set(enabled) = prefs.edit().putBoolean(SOUND, enabled).apply()
|
set(enabled) = prefs.edit().putBoolean(SOUND, enabled).apply()
|
||||||
|
|
||||||
var focusBeforeCapture: Boolean
|
|
||||||
get() = prefs.getBoolean(FOCUS_BEFORE_CAPTURE, false)
|
|
||||||
set(focus) = prefs.edit().putBoolean(FOCUS_BEFORE_CAPTURE, focus).apply()
|
|
||||||
|
|
||||||
var volumeButtonsAsShutter: Boolean
|
var volumeButtonsAsShutter: Boolean
|
||||||
get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false)
|
get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false)
|
||||||
set(volumeButtonsAsShutter) = prefs.edit().putBoolean(VOLUME_BUTTONS_AS_SHUTTER, volumeButtonsAsShutter).apply()
|
set(volumeButtonsAsShutter) = prefs.edit().putBoolean(VOLUME_BUTTONS_AS_SHUTTER, volumeButtonsAsShutter).apply()
|
||||||
|
@ -7,7 +7,6 @@ const val ORIENT_LANDSCAPE_RIGHT = 2
|
|||||||
// shared preferences
|
// shared preferences
|
||||||
const val SAVE_PHOTOS = "save_photos"
|
const val SAVE_PHOTOS = "save_photos"
|
||||||
const val SOUND = "sound"
|
const val SOUND = "sound"
|
||||||
const val FOCUS_BEFORE_CAPTURE = "focus_before_capture_2"
|
|
||||||
const val VOLUME_BUTTONS_AS_SHUTTER = "volume_buttons_as_shutter"
|
const val VOLUME_BUTTONS_AS_SHUTTER = "volume_buttons_as_shutter"
|
||||||
const val TURN_FLASH_OFF_AT_STARTUP = "turn_flash_off_at_startup"
|
const val TURN_FLASH_OFF_AT_STARTUP = "turn_flash_off_at_startup"
|
||||||
const val FLIP_PHOTOS = "flip_photos"
|
const val FLIP_PHOTOS = "flip_photos"
|
||||||
|
@ -909,8 +909,6 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
|||||||
it.width <= MAX_VIDEO_WIDTH && it.height <= MAX_VIDEO_HEIGHT
|
it.width <= MAX_VIDEO_WIDTH && it.height <= MAX_VIDEO_HEIGHT
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun shouldLockFocus() = mIsFocusSupported && mActivity.config.focusBeforeCapture
|
|
||||||
|
|
||||||
override fun setTargetUri(uri: Uri) {
|
override fun setTargetUri(uri: Uri) {
|
||||||
mTargetUri = uri
|
mTargetUri = uri
|
||||||
}
|
}
|
||||||
@ -962,7 +960,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldLockFocus()) {
|
if (mIsFocusSupported) {
|
||||||
lockFocus()
|
lockFocus()
|
||||||
} else {
|
} else {
|
||||||
captureStillPicture()
|
captureStillPicture()
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
style="@style/SettingsHolderCheckboxStyle"
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ripple_background">
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
android:id="@+id/settings_keep_settings_visible"
|
android:id="@+id/settings_keep_settings_visible"
|
||||||
@ -105,22 +105,6 @@
|
|||||||
android:text="@string/keep_settings_visible" />
|
android:text="@string/keep_settings_visible" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_focus_before_capture_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_focus_before_capture"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/focus_before_capture" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
x
Reference in New Issue
Block a user