mirror of https://github.com/M66B/FairEmail.git
Insert space before image
This commit is contained in:
parent
c532aad47c
commit
3d759a9b6a
|
@ -283,9 +283,9 @@ public class ActivitySignature extends ActivityBase {
|
||||||
String source = uri.toString();
|
String source = uri.toString();
|
||||||
Drawable d = ImageHelper.decodeImage(this, -1, source, true, 0, etText);
|
Drawable d = ImageHelper.decodeImage(this, -1, source, true, 0, etText);
|
||||||
ImageSpan is = new ImageSpan(d, source);
|
ImageSpan is = new ImageSpan(d, source);
|
||||||
ssb.setSpan(is, start, start + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
ssb.setSpan(is, start + 1, start + 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
etText.setText(ssb);
|
etText.setText(ssb);
|
||||||
etText.setSelection(start + 1);
|
etText.setSelection(start + 2);
|
||||||
}
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.unexpectedError(getSupportFragmentManager(), ex);
|
Log.unexpectedError(getSupportFragmentManager(), ex);
|
||||||
|
|
|
@ -326,9 +326,9 @@ public class FragmentAnswer extends FragmentBase {
|
||||||
String source = uri.toString();
|
String source = uri.toString();
|
||||||
Drawable d = ImageHelper.decodeImage(getContext(), -1, source, true, 0, etText);
|
Drawable d = ImageHelper.decodeImage(getContext(), -1, source, true, 0, etText);
|
||||||
ImageSpan is = new ImageSpan(d, source);
|
ImageSpan is = new ImageSpan(d, source);
|
||||||
ssb.setSpan(is, start, start + 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
ssb.setSpan(is, start + 1, start + 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
etText.setText(ssb);
|
etText.setText(ssb);
|
||||||
etText.setSelection(start + 1);
|
etText.setSelection(start + 2);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue