今天再写Android WebView 的时候,发现addJavascriptInterface里面的方法在JS里无法被调用,折腾了一个中午,才发现是因为在Android4.2以后,为了安全问题,需要在方法前加入“@JavascriptInterface”注解。
如下:
今天再写Android WebView 的时候,发现addJavascriptInterface里面的方法在JS里无法被调用,折腾了一个中午,才发现是因为在Android4.2以后,为了安全问题,需要在方法前加入“@JavascriptInterface”注解。
如下:
默认样式下,选中文字是白色文字加蓝色背景,如果需要修改选中时的背景颜色,代码如下:
1 | /*选中背景色和文字颜色*/ |
效果图如下:
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment