|
@@ -24,6 +24,7 @@ import com.cooleshow.base.utils.LogUtils;
|
|
|
import com.cooleshow.base.utils.Utils;
|
|
|
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
|
|
|
import com.cooleshow.base.widgets.WebClient;
|
|
|
+import com.cooleshow.teacher.R;
|
|
|
import com.cooleshow.teacher.widgets.helper.JsInterfaceHelper;
|
|
|
import com.cooleshow.base.widgets.LollipopFixedWebView;
|
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
@@ -39,7 +40,7 @@ import static com.cooleshow.base.common.WebConstants.WEB_URL;
|
|
|
* Author by pq, Date on 2022/4/24.
|
|
|
*/
|
|
|
@Route(path = RouterPath.WebCenter.ACTIVITY_HTML)
|
|
|
-public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener {
|
|
|
+public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements JsInterfaceHelper.OnJsMethodCallListener, View.OnClickListener {
|
|
|
|
|
|
private WebView webView;
|
|
|
private String url;
|
|
@@ -61,6 +62,8 @@ public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements Js
|
|
|
@Override
|
|
|
protected void initView() {
|
|
|
Utils.setHeadView(viewBinding.statusBarView, this, 0);
|
|
|
+ viewBinding.btnClose.setOnClickListener(this);
|
|
|
+ viewBinding.btnBack.setOnClickListener(this);
|
|
|
try {
|
|
|
if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
|
|
|
webView = new LollipopFixedWebView(this);
|
|
@@ -200,6 +203,18 @@ public class WebActivity extends BaseActivity<ActivityHtmlBinding> implements Js
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ if (v.getId() == R.id.btn_back) {
|
|
|
+ onBackPressed();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (v.getId() == R.id.btn_close) {
|
|
|
+ finish();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private class MyWebChromeClient extends WebChromeClient {
|
|
|
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
|