我有一个包含内容的原始文件:
Ah, dearest Jesus, holy Child,
make Thee a bed, soft, undefiled
within my heart, that it may be
a quiet chamber kept for Thee.
My heart for very joy doth leap,
My lips no more can silence keep;
I, too, must sing with joyful tongue
That sweetest ancient cradle song.
Glory to God in highest Heaven,
Who unto man His Son hath given;
While angels sing with tender mirth,
a glad new year to all the earth.
Amen.
当我使用 TextView 的 setText 方法时,它显示得很好,但是当我使用以下代码将上述文本复制到剪贴板时,缺少新行字符。如何修复它。
((ClipboardManager) getSystemService(CLIPBOARD_SERVICE))
.setText(tv.getText());