随笔分类 -  Android

摘要:Activity的生命周期 生命周期状态 1. 启动状态:Activity的启动状态很短,一般情况下,Activity启动之后便会进入运行状态 2. 运行状态:Activity获取焦点、可见,可以与用户进行交互 3. 暂停状态:Activity无法获取焦点,用户对它操作没有响应 4. 停止状态:Ac 阅读全文
posted @ 2019-07-01 16:23 笺笙 阅读(506) 评论(0) 推荐(0)
摘要:1. 在build.gradle中添加依赖 implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.github.bumptech.glide:glide:3.7.0' 2. 在xml中添加rec 阅读全文
posted @ 2019-05-28 22:05 笺笙 阅读(190) 评论(0) 推荐(0)
摘要:首先,添加OkHttp依赖 implementation 'com.squareup.okhttp3:okhttp:3.14.2' 因为静态接口需要Java8才能支持使用,我们要使用静态接口,需要在build.gradle文件中添加如下配置声明,使用Java8编译 compileOptions { 阅读全文
posted @ 2019-05-28 20:32 笺笙 阅读(1095) 评论(0) 推荐(0)
摘要:activity_splash.xml中进行布局: 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 xmln 阅读全文
posted @ 2019-05-28 19:38 笺笙 阅读(1767) 评论(0) 推荐(1)
摘要:首先,添加OkHttp依赖 implementation 'com.squareup.okhttp3:okhttp:3.14.2' 因为静态接口需要Java8才能支持使用,我们要使用静态接口,需要在build.gradle文件中添加如下配置声明,使用Java8编译 compileOptions { 阅读全文
posted @ 2019-05-28 15:47 笺笙 阅读(2480) 评论(0) 推荐(0)
摘要:import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5Utils { /** * MD5加密的算法 */ public static String md5( 阅读全文
posted @ 2019-03-09 09:31 笺笙 阅读(213) 评论(0) 推荐(0)