上一页 1 2 3 4 5 6 7 8 9 10 ··· 202 下一页
摘要: 布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent 阅读全文
posted @ 2024-01-08 22:41 小白龙白龙马 阅读(7) 评论(0) 推荐(0) 编辑
摘要: ifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android 阅读全文
posted @ 2024-01-07 19:52 小白龙白龙马 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 利用Glide实现图片的三级缓存 图片加载框架之所以高效,是因为它不但封装了访问网络的步骤,而且引入了三级缓存机制。 缓存过程说明如下:(1)先到内存(运存)中查找图片;(2)有找到就直接显示内存图片,没找到的话再去磁盘(闪存)查找图片;(3)在磁盘能找到就直接显示磁盘图片,没找到的话再去请求网络; 阅读全文
posted @ 2024-01-07 19:12 小白龙白龙马 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Glide是谷歌开发的图片加载框架,也是Android官方推荐的图片加载框架。 使用Glide之前需要先导入glide库:implementation 'com.github.bumptech.glide:glide:4.13.0‘ Glide的用法很简单,只需一行代码即可将网络图片加载到图像视图界 阅读全文
posted @ 2024-01-07 18:07 小白龙白龙马 阅读(74) 评论(0) 推荐(0) 编辑
摘要: gradle添加依赖: implementation 'com.squareup.okhttp3:okhttp:4.9.3' ifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.a 阅读全文
posted @ 2024-01-07 17:15 小白龙白龙马 阅读(27) 评论(0) 推荐(0) 编辑
摘要: ifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android 阅读全文
posted @ 2024-01-07 12:37 小白龙白龙马 阅读(231) 评论(0) 推荐(0) 编辑
摘要: ifest文件,网络权限申请: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema 阅读全文
posted @ 2024-01-07 12:02 小白龙白龙马 阅读(38) 评论(0) 推荐(0) 编辑
摘要: xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="mat 阅读全文
posted @ 2024-01-06 20:19 小白龙白龙马 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 一、认识Looper和Handler对象 当主线程诞生时,就会去执行一个消息循环(Message Loop),以便持续监视它的消息队列(Message Queue简称MQ)。 当UI事件发生了,通常会立即丢一个Message给MQ,此时主线程就立即从MQ里边取出该消息并处理。 比如,用户在UI界面上 阅读全文
posted @ 2024-01-06 18:50 小白龙白龙马 阅读(30) 评论(0) 推荐(0) 编辑
摘要: xml配置文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_par 阅读全文
posted @ 2024-01-06 18:05 小白龙白龙马 阅读(14) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 202 下一页