06 2024 档案

摘要:Adapter是介于data层和view层之间的媒介。 在Android中,自定义Adapter通常是通过扩展BaseAdapter类来实现的。以下是一个简单的自定义Adapter的例子,它展示了如何在ListView中展示一个简单的字符串列表。 import android.content.Con 阅读全文
posted @ 2024-06-27 14:12 黄增松 阅读(31) 评论(0) 推荐(0) 编辑
摘要:自定义弹窗 Android 在Android中创建自定义弹窗通常涉及到使用Dialog或DialogFragment。以下是一个简单的自定义弹窗的例子: 定义一个布局文件(例如custom_dialog.xml)来描述弹窗的外观和行为。 <!-- custom_dialog.xml --> <Lin 阅读全文
posted @ 2024-06-26 11:20 黄增松 阅读(221) 评论(0) 推荐(0) 编辑
摘要:应用程序创建Context实例的情况有如下几种: 1.创建Application对象时,而且整个app只有一个Application对象2.创建Service对象时3.创建Activity对象时因此应用程序App共有的Context数目公式为: 总Context实例个数=Service个数+Acti 阅读全文
posted @ 2024-06-25 14:50 黄增松 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Intent intent = new Intent(context, PwdLoginActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); context.startActivity(intent); FLAG_ACT 阅读全文
posted @ 2024-06-25 11:36 黄增松 阅读(37) 评论(0) 推荐(0) 编辑
摘要:本地存储 替代 userDefault (也有iOS版本) MMKV:https://github.com/Tencent/MMKV 日志 logger:https://github.com/orhanobut/logger EventBus 跨页面传值 类似iOS的通知 https://githu 阅读全文
posted @ 2024-06-21 09:56 黄增松 阅读(95) 评论(0) 推荐(1) 编辑
摘要:Android的Manifest.xml文件是一个重要的配置文件,用于描述应用程序的各种信息,包括应用程序的包名、版本号、应用程序的入口Activity、权限要求等等。它的作用如下: 1.声明权限:Manifest文件可以声明应用程序需要使用的权限,例如访问网络、读写SD卡等。当用户安装应用程序时, 阅读全文
posted @ 2024-06-20 17:13 黄增松 阅读(272) 评论(0) 推荐(0) 编辑
摘要:UICollectionView的基础使用。 https://www.jianshu.com/p/34ab4bba228b 一定要切记,下面三个代理。不要搞混了。 UICollectionViewDataSource extension SearchHistoryView: UICollection 阅读全文
posted @ 2024-06-14 17:47 黄增松 阅读(145) 评论(0) 推荐(0) 编辑
摘要:本来某个三方库 300多M,结果只下载了5K左右。 解决方案 https://www.jianshu.com/p/ee6c0a412f11 原理就是 清除cocoapods缓存,重新更新cocoapods仓库,重新安装。以便于三方库的最新版本能下载下来。 或者去别的同事电脑上,以下路径里找到三方库的 阅读全文
posted @ 2024-06-13 15:33 黄增松 阅读(53) 评论(0) 推荐(0) 编辑
摘要:https://gitcode.com/xiaoleiiOS/XLScrollView/overview tableview实现下列方法,tableview和scrollview 能同时识别手势 /** 同时识别多个手势 @param gestureRecognizer gestureRecogni 阅读全文
posted @ 2024-06-13 12:05 黄增松 阅读(38) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/3249b5731b50 阅读全文
posted @ 2024-06-13 12:01 黄增松 阅读(5) 评论(0) 推荐(0) 编辑
摘要:崩溃之前的代码 NSMutableDictionary *item = [NSMutableDictionary dictionaryWithDictionary:guaranteedModeDict]; NSMutableDictionary *modelDict = item[MODEL]; [ 阅读全文
posted @ 2024-06-12 14:57 黄增松 阅读(26) 评论(0) 推荐(0) 编辑
摘要:typealias ActionBlock = ((UIButton)->Void) extension UIButton { private struct AssociatedKeys { static var ActionBlock = "ActionBlock" static var Acti 阅读全文
posted @ 2024-06-04 09:06 黄增松 阅读(28) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示