上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: 运行时权限 使用ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.CALL_PHONE)!=PackageManager.PERMISSION_GRANTED//判断是否有权限 ActivityCompat 阅读全文
posted @ 2018-08-16 11:28 lancelee98 阅读(353) 评论(0) 推荐(0) 编辑
摘要: HttpURLConnection OkHttp 添加依赖 编辑 app/build.gradle 在dependencies闭包中添加 implementation 'com.squareup.okhttp3:okhttp:3.11.0' GET OkHttpClient client = new 阅读全文
posted @ 2018-08-15 16:50 lancelee98 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 动态注册监听网络变化 创建intentFilter 并addAction 代表了监听哪个广播 然后使用registerReceiver()方法 将intentFilter 与 自己创建的监听器 传进去 动态注册的 需要unregisterReciver() 权限需要在Mainfest中声明 publ 阅读全文
posted @ 2018-08-13 16:14 lancelee98 阅读(1529) 评论(0) 推荐(0) 编辑
摘要: TextView android:gravity="center"居中对齐 //文字对齐方式 top bottom left right center android:textSize="24sp" android:textColor=" ffffff" Button textAllCaps="fa 阅读全文
posted @ 2018-08-13 13:16 lancelee98 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 正则表达式 Regular Expression (regex regexp re) str.search(正则表达式) 检索str字符串 返回子串起始位置 str.replace(正则表达式,‘要替换的内容’) 检索str的字符串并替换 正则表达式的修饰符 i 不区分大小写 g 全局匹配 m 多行 阅读全文
posted @ 2018-08-13 13:11 lancelee98 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Number 1.2345e3=1.2345 1000 NaN//not a num 无法计算结果 Infinity //无限大 数组 var arr=[1,2,'hello'] 下标从0开始 对象 ` var person={ name:'bob', age:20, }; ` 调用时 person 阅读全文
posted @ 2018-08-13 11:37 lancelee98 阅读(149) 评论(0) 推荐(0) 编辑
摘要: XML给元素定义ID 定义id android:id="@+id/button_1" 引用id 解决Failed to load Appcompat Actionbar with unknown error 在Project 中找到\app\src\main\res\values\styles.xm 阅读全文
posted @ 2018-08-08 12:52 lancelee98 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 引用Bootstrap需要的 基本格式 `<!doctype html <! Bootstrap CSS Hello, world! Hello, world! ` 基本容器container 全宽容器 container fluid 媒体查询 @media (min width:576 px) a 阅读全文
posted @ 2018-08-06 14:56 lancelee98 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 将容器指定为Flex布局 display:flex —— d flex display: webkit flex / Safari / float clear vertical align失效 行内元素 display:inline flex d inline flex ||.d sm flex 六 阅读全文
posted @ 2018-08-06 10:25 lancelee98 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 第一步下载Python3.7.0 刚开始我是在windows上下载之后 传到FTP服务器上的 后来发现使用以下命令可以更快捷地下载到服务器 * wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz wget 是一个从网络上自动下载 阅读全文
posted @ 2018-07-23 00:13 lancelee98 阅读(363) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 下一页