File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
app/src/main/kotlin/org/fossify/filemanager/activities Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import android.net.Uri
77import android.os.Bundle
88import android.print.PrintAttributes
99import android.print.PrintManager
10+ import android.util.Base64
1011import android.view.inputmethod.EditorInfo
1112import android.webkit.WebResourceRequest
1213import android.webkit.WebView
@@ -229,7 +230,9 @@ class ReadTextActivity : SimpleActivity() {
229230 }
230231 }
231232
232- webView.loadData(binding.readTextView.text.toString(), " text/plain" , " UTF-8" )
233+ val text = binding.readTextView.text.toString()
234+ val base64 = Base64 .encodeToString(text.toByteArray(), Base64 .DEFAULT )
235+ webView.loadData(base64, " text/plain" , " base64" )
233236 } catch (e: Exception ) {
234237 showErrorToast(e)
235238 }
You can’t perform that action at this time.
0 commit comments