Commit 9e0d1b18 by 霍志良

feat:增加进度条,移除loading

parent 60a45ede
......@@ -36,12 +36,12 @@ class JsMethod {
return true
}
"show_loading" -> {
val topActivity = BaseActivityMgr.INST.getTopActivity()
Loading.show(topActivity)
// val topActivity = BaseActivityMgr.INST.getTopActivity()
// Loading.show(topActivity)
return true
}
"close_loading" -> {
Loading.close()
// Loading.close()
return true
}
"open_app_eval_list"->{
......
......@@ -145,7 +145,6 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
uid = arguments?.getString(KEY_UID)
listen_free = arguments?.getBoolean(KEY_LISTEN_FREE) ?: false
onLoadDialStatus(doctorId)
// +
wv_content = view.findViewById<ProgressWebView>(com.ydl.webview.R.id.wv_content)
wv_content.progressbar.visibility = View.GONE
close_webview_Icon = view.findViewById<View>(R.id.close_webview_Icon)
......@@ -449,6 +448,14 @@ class ConfideBottomSheetDialogFragment : BottomSheetDialogFragment() {
override fun onProgressChanged(view: WebView, newProgress: Int) {
if (newProgress == 100) {
wv_content.progressbar.visibility = View.GONE
} else {
if (wv_content.progressbar.visibility == View.GONE) {
wv_content.progressbar.visibility = View.VISIBLE
}
wv_content.progressbar.progress = newProgress
}
if (newProgress == 100) {
callJsFun(wv_content, "setUnRead(${uid?.let { getUnReadByUid(uid = it) }})")
}
super.onProgressChanged(view, newProgress)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment