mirror of
				https://github.com/SimpleMobileTools/Simple-Camera.git
				synced 2025-06-27 09:02:59 +02:00 
			
		
		
		
	removing the FocusBeforeCapture setting
This commit is contained in:
		| @@ -28,7 +28,6 @@ class SettingsActivity : SimpleActivity() { | ||||
|         setupCustomizeColors() | ||||
|         setupUseEnglish() | ||||
|         setupSound() | ||||
|         setupFocusBeforeCapture() | ||||
|         setupVolumeButtonsAsShutter() | ||||
|         setupTurnFlashOffAtStartup() | ||||
|         setupFlipPhotos() | ||||
| @@ -101,7 +100,7 @@ class SettingsActivity : SimpleActivity() { | ||||
|         settings_use_english.isChecked = config.useEnglish | ||||
|  | ||||
|         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 { | ||||
| @@ -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() { | ||||
|         settings_volume_buttons_as_shutter.isChecked = config.volumeButtonsAsShutter | ||||
|         settings_volume_buttons_as_shutter_holder.setOnClickListener { | ||||
|   | ||||
| @@ -25,10 +25,6 @@ class Config(context: Context) : BaseConfig(context) { | ||||
|         get() = prefs.getBoolean(SOUND, true) | ||||
|         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 | ||||
|         get() = prefs.getBoolean(VOLUME_BUTTONS_AS_SHUTTER, false) | ||||
|         set(volumeButtonsAsShutter) = prefs.edit().putBoolean(VOLUME_BUTTONS_AS_SHUTTER, volumeButtonsAsShutter).apply() | ||||
|   | ||||
| @@ -7,7 +7,6 @@ const val ORIENT_LANDSCAPE_RIGHT = 2 | ||||
| // shared preferences | ||||
| const val SAVE_PHOTOS = "save_photos" | ||||
| 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 TURN_FLASH_OFF_AT_STARTUP = "turn_flash_off_at_startup" | ||||
| 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 | ||||
|     } | ||||
|  | ||||
|     private fun shouldLockFocus() = mIsFocusSupported && mActivity.config.focusBeforeCapture | ||||
|  | ||||
|     override fun setTargetUri(uri: Uri) { | ||||
|         mTargetUri = uri | ||||
|     } | ||||
| @@ -962,7 +960,7 @@ class CameraPreview : ViewGroup, TextureView.SurfaceTextureListener, MyPreview { | ||||
|             return | ||||
|         } | ||||
|  | ||||
|         if (shouldLockFocus()) { | ||||
|         if (mIsFocusSupported) { | ||||
|             lockFocus() | ||||
|         } else { | ||||
|             captureStillPicture() | ||||
|   | ||||
| @@ -95,7 +95,7 @@ | ||||
|                 style="@style/SettingsHolderCheckboxStyle" | ||||
|                 android:layout_width="match_parent" | ||||
|                 android:layout_height="wrap_content" | ||||
|                 android:background="@drawable/ripple_background"> | ||||
|                 android:background="@drawable/ripple_bottom_corners"> | ||||
|  | ||||
|                 <com.simplemobiletools.commons.views.MyAppCompatCheckbox | ||||
|                     android:id="@+id/settings_keep_settings_visible" | ||||
| @@ -105,22 +105,6 @@ | ||||
|                     android:text="@string/keep_settings_visible" /> | ||||
|  | ||||
|             </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> | ||||
|  | ||||
|         <TextView | ||||
|   | ||||
		Reference in New Issue
	
	Block a user