Browse Source

Remove underline spans

main
M66B 6 years ago
parent
commit
43d7add8f4
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      app/src/main/java/eu/faircode/email/FragmentCompose.java

+ 8
- 1
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -35,12 +35,14 @@ import android.os.Looper;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.provider.OpenableColumns; import android.provider.OpenableColumns;
import android.text.Html; import android.text.Html;
import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.ImageSpan; import android.text.style.ImageSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.text.style.URLSpan; import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
import android.util.Log; import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -655,7 +657,12 @@ public class FragmentCompose extends FragmentEx {
args.putString("cc", etCc.getText().toString()); args.putString("cc", etCc.getText().toString());
args.putString("bcc", etBcc.getText().toString()); args.putString("bcc", etBcc.getText().toString());
args.putString("subject", etSubject.getText().toString()); args.putString("subject", etSubject.getText().toString());
args.putString("body", Html.toHtml(etBody.getText()));
Spannable spannable = etBody.getText();
UnderlineSpan[] uspans = spannable.getSpans(0, spannable.length(), UnderlineSpan.class);
for (UnderlineSpan uspan : uspans)
spannable.removeSpan(uspan);
args.putString("body", Html.toHtml(spannable));
Log.i(Helper.TAG, "Run load id=" + working); Log.i(Helper.TAG, "Run load id=" + working);
actionLoader.load(this, args); actionLoader.load(this, args);


Loading…
Cancel
Save