diff --git a/app/src/main/java/com/simplemobiletools/camera/Config.java b/app/src/main/java/com/simplemobiletools/camera/Config.java
index de5c6180..5a93ce63 100644
--- a/app/src/main/java/com/simplemobiletools/camera/Config.java
+++ b/app/src/main/java/com/simplemobiletools/camera/Config.java
@@ -29,4 +29,12 @@ public class Config {
public void setFocusBeforeCaptureEnabled(boolean enabled) {
mPrefs.edit().putBoolean(Constants.FOCUS_BEFORE_CAPTURE, enabled).apply();
}
+
+ public boolean getForceRatioEnabled() {
+ return mPrefs.getBoolean(Constants.FORCE_RATIO, true);
+ }
+
+ public void setForceRatioEnabled(boolean enabled) {
+ mPrefs.edit().putBoolean(Constants.FORCE_RATIO, enabled).apply();
+ }
}
diff --git a/app/src/main/java/com/simplemobiletools/camera/Constants.java b/app/src/main/java/com/simplemobiletools/camera/Constants.java
index 3f58b22a..dc6be245 100644
--- a/app/src/main/java/com/simplemobiletools/camera/Constants.java
+++ b/app/src/main/java/com/simplemobiletools/camera/Constants.java
@@ -9,4 +9,5 @@ public class Constants {
public static final String PREFS_KEY = "Camera";
public static final String LONG_TAP = "long_tap";
public static final String FOCUS_BEFORE_CAPTURE = "focus_before_capture";
+ public static final String FORCE_RATIO = "force_ratio";
}
diff --git a/app/src/main/java/com/simplemobiletools/camera/activities/SettingsActivity.java b/app/src/main/java/com/simplemobiletools/camera/activities/SettingsActivity.java
index b67dae62..85c2b559 100644
--- a/app/src/main/java/com/simplemobiletools/camera/activities/SettingsActivity.java
+++ b/app/src/main/java/com/simplemobiletools/camera/activities/SettingsActivity.java
@@ -14,6 +14,7 @@ import butterknife.OnClick;
public class SettingsActivity extends AppCompatActivity {
@BindView(R.id.settings_long_tap) SwitchCompat mLongTapSwitch;
@BindView(R.id.settings_focus_before_capture) SwitchCompat mFocusBeforeCaptureSwitch;
+ @BindView(R.id.settings_force_ratio) SwitchCompat mForceRatioSwitch;
private static Config mConfig;
@@ -26,6 +27,7 @@ public class SettingsActivity extends AppCompatActivity {
setupLongTap();
setupFocusBeforeCapture();
+ setupForceRatio();
}
private void setupLongTap() {
@@ -36,6 +38,10 @@ public class SettingsActivity extends AppCompatActivity {
mFocusBeforeCaptureSwitch.setChecked(mConfig.getFocusBeforeCaptureEnabled());
}
+ private void setupForceRatio() {
+ mForceRatioSwitch.setChecked(mConfig.getForceRatioEnabled());
+ }
+
@OnClick(R.id.settings_long_tap_holder)
public void handleLongTapToTrigger() {
mLongTapSwitch.setChecked(!mLongTapSwitch.isChecked());
@@ -47,4 +53,10 @@ public class SettingsActivity extends AppCompatActivity {
mFocusBeforeCaptureSwitch.setChecked(!mFocusBeforeCaptureSwitch.isChecked());
mConfig.setFocusBeforeCaptureEnabled(mFocusBeforeCaptureSwitch.isChecked());
}
+
+ @OnClick(R.id.settings_force_ratio_holder)
+ public void handleForceRatio() {
+ mForceRatioSwitch.setChecked(!mForceRatioSwitch.isChecked());
+ mConfig.setForceRatioEnabled(mForceRatioSwitch.isChecked());
+ }
}
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 7d4c2efb..7f78a7e9 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -57,4 +57,30 @@
android:clickable="false"/>
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3cb13773..4e926dfe 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -16,6 +16,7 @@
Settings
Long tap to capture
Refocus before capture
+ Force 16:9 ratio
About