|
|
|
@ -38,7 +38,6 @@ import okhttp3.ResponseBody.Companion.toResponseBody
|
|
|
|
|
import org.json.JSONObject
|
|
|
|
|
import retrofit2.Response
|
|
|
|
|
import java.io.BufferedReader
|
|
|
|
|
import java.io.File
|
|
|
|
|
import java.io.FileOutputStream
|
|
|
|
|
import java.io.IOException
|
|
|
|
|
import java.io.InputStreamReader
|
|
|
|
@ -109,6 +108,7 @@ class MainActivity : AppCompatActivity() {
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
easyMDE.codemirror.getScrollerElement().style.minHeight="100px";
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
@ -162,6 +162,11 @@ class MainActivity : AppCompatActivity() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
webView.viewTreeObserver.addOnGlobalLayoutListener {
|
|
|
|
|
webView.evaluateJavascript("easyMDE.codemirror.getScrollerElement().style.height=String(window.innerHeight-120) +\"px\"", {
|
|
|
|
|
Log.d(javaClass.simpleName, "js window innerheight set to: $it")
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
webView.loadUrl("file:///android_res/raw/index.html")
|
|
|
|
|
|
|
|
|
|
val jsi = object {
|
|
|
|
@ -269,7 +274,6 @@ class MainActivity : AppCompatActivity() {
|
|
|
|
|
override fun onResume() {
|
|
|
|
|
super.onResume()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!readOnResume) {
|
|
|
|
|
readOnResume = true
|
|
|
|
|
autosaveTimer = fixedRateTimer("timer",true,0,5000){
|
|
|
|
|