Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: improve EditText line spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mkx173 committed Apr 9, 2024
1 parent 371a58b commit 912f2da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ private void showRegexDialog(final Activity activity, final String title) {
editText.setHintTextColor(Color.GRAY);
}
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
editText.setFallbackLineSpacing(false);
editText.setLineSpacing(0, 1.2F);

final LinearLayout linearLayout = new LinearLayout(currentActivity);
linearLayout.setGravity(Gravity.CENTER_HORIZONTAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Editable;
Expand Down Expand Up @@ -95,6 +94,8 @@ private void showRegexDialog(final Activity activity) {
editText.setHintTextColor(Color.GRAY);
}
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
editText.setFallbackLineSpacing(false);
editText.setLineSpacing(0, 1.2F);

editText.addTextChangedListener(new TextWatcher() {
@Override
Expand Down

0 comments on commit 912f2da

Please sign in to comment.