Skip to content

Commit 3054357

Browse files
authored
Merge pull request #2 from MohamedElidrissi/master
Remove auto-correction and underlines from code EditText
2 parents 3ddfd3f + 882aa20 commit 3054357

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

syntax-view/src/main/java/net/cryptobrewery/syntaxview/SyntaxView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ private void initialize(Context context, String BackgroundColor, final String ke
7777
inflate(context, R.layout.syntaxview, this);
7878
code = findViewById(R.id.code);
7979
rows = findViewById(R.id.rows);
80-
code.setBackgroundColor(Color.parseColor(BackgroundColor));
80+
code.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
81+
code.setSingleLine(false);
82+
code.setImeOptions(EditorInfo.IME_FLAG_NO_ENTER_ACTION); code.setBackgroundColor(Color.parseColor(BackgroundColor));
8183
code.addTextChangedListener(new TextWatcher() {
8284

8385

syntax-view/src/main/res/layout/syntaxview.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
android:layout_weight="0.1"
3939
android:background="#2b2b2b"
4040
android:gravity="top"
41-
android:inputType="textMultiLine"
4241
android:paddingTop="7dp"
4342
android:shadowColor="#fff"
4443
android:text="//Write Your Code Here"

0 commit comments

Comments
 (0)