diff --git a/app/src/main/java/com/maxistar/textpad/service/SettingsService.java b/app/src/main/java/com/maxistar/textpad/service/SettingsService.java
index a2877e3..4637fcf 100644
--- a/app/src/main/java/com/maxistar/textpad/service/SettingsService.java
+++ b/app/src/main/java/com/maxistar/textpad/service/SettingsService.java
@@ -30,6 +30,8 @@ public class SettingsService {
public static final String SETTING_ALTERNATIVE_FILE_ACCESS = "use_alternative_file_access";
public static final String SETTING_SHOW_LAST_EDITED_FILES = "show_last_edited_files";
+ public static final String SETTING_AUTO_WRAPPING = "auto_wrapping";
+
private static final String SETTING_USE_WAKE_LOCK = "use_wake_lock";
public static final String SETTING_USE_SIMPLE_SCROLLING = "use_simple_scrolling";
@@ -59,6 +61,7 @@ public class SettingsService {
private boolean legacy_file_picker = false;
private boolean alternative_file_access = true;
private boolean auto_save_current_file = false;
+ private boolean auto_wrapping = true;
private String file_encoding = "";
private String last_filename = "";
@@ -93,6 +96,7 @@ public void loadSettings(Context context) {
useWakeLock = sharedPref.getBoolean(SETTING_USE_WAKE_LOCK, false);
useSimpleScrolling = sharedPref.getBoolean(SETTING_USE_SIMPLE_SCROLLING, false);
alternative_file_access = sharedPref.getBoolean(SETTING_ALTERNATIVE_FILE_ACCESS, true);
+ auto_wrapping = sharedPref.getBoolean(SETTING_AUTO_WRAPPING, true);
last_filename = sharedPref.getString(SETTING_LAST_FILENAME, TPStrings.EMPTY);
file_encoding = sharedPref.getString(SETTING_FILE_ENCODING, TPStrings.UTF_8);
delimiters = sharedPref.getString(SETTING_DELIMITERS, TPStrings.EMPTY);
@@ -281,4 +285,8 @@ public boolean useWakeLock() {
public boolean isUseSimpleScrolling() {
return this.useSimpleScrolling;
}
+
+ public boolean isAutoWrapping() {
+ return this.auto_wrapping;
+ }
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1c36982..8ddaeca 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -90,6 +90,8 @@
Autosaving
Automatically save currently editing file when window is closed
+ Autowrapping
+ wrap the line if text too long
Open other…
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index e69f260..c3d98f0 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -20,6 +20,12 @@
android:summary="@string/preferenceAutoSaveCurrentFileDescription"
android:defaultValue="false" />
+
+