上一页 1 ··· 22 23 24 25 26
摘要: WebView在加载失败时会显示一个失败原因的界面,各个手机显示的界面还都不一样,部分手机还会把Url显示出来;我们要做的就是统一加载失败的界面; 大概思路:在WebView这个控件上面再覆盖一个View,监听WebView加载失败时把这个View显示出来,这样用户就看不到原来的WebView的失败 阅读全文
posted @ 2021-08-10 12:01 愚哦 阅读(969) 评论(0) 推荐(0)
摘要: Kotlin语言中 集合的api中有很多强大的功能 例如list集合提供了 一个 shuffled()的函数可以对集合进行洗牌(类似于扑克牌的洗牌),这样吧每次可以获取到不同的数据,可以很容易实现类似于首页随机推荐几条数据的功能。//运行以下函数fun main(args:Array<String> 阅读全文
posted @ 2021-08-10 12:00 愚哦 阅读(685) 评论(0) 推荐(0)
摘要: SyntaxThere are two types of parsers in the system: the full SQL parser (a recursive descent parser), and the data format parser (a fast stream parser 阅读全文
posted @ 2021-08-08 18:58 愚哦 阅读(302) 评论(0) 推荐(0)
摘要: mart phones were the new hit many years ago. As a consequence, the programming languages that were used to write mobile applications became very popul 阅读全文
posted @ 2021-08-08 18:58 愚哦 阅读(191) 评论(0) 推荐(0)
摘要: 第一种: 在h5中调用kotlin的方法:使用flask起一个简单的web项目,在项目中添加一个按钮,并加入js代码 然后在kotlin中创建一个类: package com.example.mykotlinh5 import android.content.Context import andro 阅读全文
posted @ 2021-08-08 18:57 愚哦 阅读(215) 评论(0) 推荐(0)
摘要: 示例如下: /view/webview/WebViewDemo5.java /** WebView 通过 post 加载 url,自定义请求 header,获取或设置 cookie postUrl() - 通过 post 方式加载指定的 url loadUrl() - 追加自定义 header 并加 阅读全文
posted @ 2021-07-16 14:04 愚哦 阅读(531) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26