webView中js调用android方法一调用程序就退出是怎么回事

webView中js调用android方法一调用程序就退出是怎么回事
webView.addJavascriptInterface(new Object(){
         public void showToast(String name){
         Toast.makeText(SujieEasyActivity.this, name+"sdsdfsdfsf", Toast.LENGTH_LONG).show();
         }
        
         public void setVisableFlase(){
         Toast.makeText(SujieEasyActivity.this, "onfocus", Toast.LENGTH_SHORT).show();
         if(menus!=null){
         menus.setVisibility(View.GONE);
         }
            }
            
         public void setVisableTrue(){
         Toast.makeText(SujieEasyActivity.this, "onblurs", Toast.LENGTH_SHORT).show();
            }
        }, "myObj");
android方法里面想让控件隐藏起来

你可能感兴趣的:(webView中js调用android方法一调用程序就退出是怎么回事)