File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
kotlin/com/simplemobiletools/filemanager/activities Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ class ReadTextActivity : SimpleActivity() {
2626 private fun checkIntent () {
2727 read_text_view.setTextColor(config.textColor)
2828 val uri = intent.data
29- if (uri.scheme == " file" ) {
30- read_text_view.text = File (uri.path).readText()
29+ val text = if (uri.scheme == " file" ) {
30+ File (uri.path).readText()
3131 } else {
32- read_text_view.text = contentResolver.openInputStream(uri).bufferedReader().use { it.readText() }
32+ contentResolver.openInputStream(uri).bufferedReader().use { it.readText() }
3333 }
34+
35+ read_text_view.setText(text)
3436 }
3537}
Original file line number Diff line number Diff line change 55 android : layout_width =" match_parent"
66 android : layout_height =" wrap_content" >
77
8- <com .simplemobiletools.commons.views.MyTextView
8+ <com .simplemobiletools.commons.views.MyEditText
99 android : id =" @+id/read_text_view"
1010 android : layout_width =" match_parent"
1111 android : layout_height =" wrap_content"
12+ android : background =" @null"
1213 android : padding =" @dimen/medium_margin"
14+ android : textCursorDrawable =" @null"
1315 android : textSize =" @dimen/smaller_text_size" />
1416
1517</ScrollView >
You can’t perform that action at this time.
0 commit comments