打赏
摘要: 1、二维码生成二维码生成用到了Zxing 包,gradle 中引用 compile 'com.google.zxing:core:3.2.1' 生成带有logo的二维码 public class QrCodeUtil{ /** * 黑点颜色 */ private static final int B 阅读全文
posted @ 2020-05-11 13:17 吃瓜大湿熊 阅读(635) 评论(0) 推荐(0)
摘要: private Bitmap compoundBitmap(Bitmap bitmapOne,Bitmap bitmapTwo){ Bitmap newBitmap = null; newBitmap=bitmapOne.copy(Bitmap.Config.ARGB_8888, true); // 阅读全文
posted @ 2020-05-11 13:11 吃瓜大湿熊 阅读(863) 评论(0) 推荐(0)
摘要: 由于在Android 7.0 采用了StrictMode API政策禁,其中有一条限制就是对目录访问的限制。 这项变更意味着我们无法通过File API访问手机存储上的数据,也就是说,给其他应用传递 file:// URI 类型的Uri,可能会导致接受者无法访问该路径,并且会会触发 FileUriE 阅读全文
posted @ 2020-05-08 13:21 吃瓜大湿熊 阅读(805) 评论(0) 推荐(0)
摘要: List<Student> testList = new ArrayList<Student>(); List<Student> repeatList = new ArrayList<Student>();//用于存放重复的元素的list Map<String, Integer> map = new 阅读全文
posted @ 2020-05-08 10:52 吃瓜大湿熊 阅读(9183) 评论(0) 推荐(1)
摘要: Stream 中文称为 “流”,通过将集合转换为这么一种叫做 “流” 的元素序列,通过声明性方式,能够对集合中的每个元素进行一系列并行或串行的流水线操作。 函数式编程带来的好处尤为明显。这种代码更多地表达了业务逻辑的意图,而不是它的实现机制。易读的代码也易于维护、更可靠、更不容易出错。 面对一对多结 阅读全文
posted @ 2020-05-08 10:36 吃瓜大湿熊 阅读(363) 评论(0) 推荐(0)
摘要: List<User> userList=userList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(User :: ge 阅读全文
posted @ 2020-05-08 10:22 吃瓜大湿熊 阅读(3614) 评论(0) 推荐(0)
摘要: switch (receive.getConditionWhere()) { case "0": break; case "1": //新品优先 Collections.sort(likeFloorGoods, new Comparator<ReturnGoodsStockBean>(){ @Ove 阅读全文
posted @ 2020-05-08 10:18 吃瓜大湿熊 阅读(2715) 评论(0) 推荐(0)
摘要: list.stream().mapToDouble(User::getAge).sum()//和 list.stream().mapToDouble(User::getAge).max()//最大 list.stream().mapToDouble(User::getAge).min()//最小 l 阅读全文
posted @ 2020-05-08 10:16 吃瓜大湿熊 阅读(5477) 评论(0) 推荐(1)
摘要: 集成步骤 Java 项目配置 dependencies { compile 'com.cuieney:rxpay-api:2.2.3' annotationProcessor 'com.cuieney:rxpay-compiler:2.1.1' //如果你项目配置了kotlin请忽略下面这行的配置 阅读全文
posted @ 2020-05-07 14:30 吃瓜大湿熊 阅读(980) 评论(0) 推荐(0)
摘要: 代码思路 VegaLayoutManager RecyclerView最顶部的itemView,会随着手指滑动实现收缩隐藏与放大显示,并伴随recycler的回收与复用。代码比较简单粗暴,使用自定义的LayoutManger,内置SnapHelper。由于想要在任意时刻都能snap到第一个子View 阅读全文
posted @ 2020-05-07 14:25 吃瓜大湿熊 阅读(2264) 评论(0) 推荐(0)