Skip to content

Commit b5f63da

Browse files
authored
Merge pull request #190 from maxistar/codex/update-text-editor-to-prevent-autowrapping
Disable autowrapping in editor
2 parents eba9cab + e6012c5 commit b5f63da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/src/main/java/com/maxistar/textpad/activities/EditorActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public void onCreate(Bundle savedInstanceState) {
164164
}
165165
mText = this.findViewById(R.id.editText1);
166166
mText.setBackgroundResource(android.R.color.transparent);
167+
configureTextEditor();
167168
editTextUndoRedo = new EditTextUndoRedo(mText, this);
168169

169170
if (simpleScrolling()) {
@@ -431,6 +432,12 @@ void applyPreferences() {
431432
applyColors();
432433
}
433434

435+
private void configureTextEditor() {
436+
mText.setHorizontallyScrolling(true);
437+
mText.setHorizontalScrollBarEnabled(true);
438+
mText.setMaxLines(Integer.MAX_VALUE);
439+
}
440+
434441
private void applyFontFace() {
435442
mText.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE |
436443
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS |

0 commit comments

Comments
 (0)