|
|
|
@ -279,13 +279,13 @@ public class ActivitySignature extends ActivityBase {
|
|
|
|
|
etText.getText().insert(start, "<img src=\"" + Html.escapeHtml(uri.toString()) + "\" />");
|
|
|
|
|
else {
|
|
|
|
|
SpannableStringBuilder ssb = new SpannableStringBuilder(etText.getText());
|
|
|
|
|
ssb.insert(start, "\uFFFC"); // Object replacement character
|
|
|
|
|
ssb.insert(start, " \uFFFC"); // Object replacement character
|
|
|
|
|
String source = uri.toString();
|
|
|
|
|
Drawable d = ImageHelper.decodeImage(this, -1, source, true, 0, etText);
|
|
|
|
|
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.setSelection(start + 1);
|
|
|
|
|
etText.setSelection(start + 2);
|
|
|
|
|
}
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.unexpectedError(getSupportFragmentManager(), ex);
|
|
|
|
|