随笔分类 -  android-ui

android-ui
摘要:Android开发绘制白色Bitmap显示却是黑的而其他颜色显示正常的解决方法 //实现绘制白色Bitmap的代码如下: public class DrawView extends View { private Bitmap bitmap; private Paint paint; public D 阅读全文
posted @ 2022-07-14 11:24 yongfengnice 阅读(800) 评论(0) 推荐(0) 编辑
摘要:android11 分区存储SAF迁移工具类 https://github.com/yongfengnice/android11Saf/blob/main/app/src/main/java/com/example/safdemo/utils/DocumentHelper.java 具体github 阅读全文
posted @ 2021-09-06 15:06 yongfengnice 阅读(331) 评论(0) 推荐(0) 编辑
摘要://逻辑:代码里latch.countDown() 和 latch.await()要同时出现, //而且latch.countDown()最总次数n和初始化CountDownLatch(n)相同 public class Test { private int taskNums = 3; privat 阅读全文
posted @ 2021-08-30 15:27 yongfengnice 阅读(521) 评论(0) 推荐(0) 编辑
摘要:android开发分享一个电脑显示和控制android手机的开源软件 https://github.com/Genymobile/scrcpy 支持window, linux, mac平台 阅读全文
posted @ 2021-08-30 12:06 yongfengnice 阅读(139) 评论(0) 推荐(0) 编辑
摘要:记一次GridView无法滚动到底部的解决方法 在实现需求时出现了GridView无法滚动到底部的bug,第一时间各种百度、Google搜索,还是找不到解决问题的方法。。。我果然是一名cv搬砖的呀,最后还是靠自己分析找出原因对症下药,记录一下以便回顾 解决方法一是自定义GridView重写onMea 阅读全文
posted @ 2021-06-07 11:33 yongfengnice 阅读(365) 评论(0) 推荐(0) 编辑
摘要://ratio比例传递 0.5 就是两种颜色叠加混合的结果,也可以根据自己的需求调整比例 public static int mixColor(int color1, int color2, float ratio) { final float inverse = 1 - ratio; float 阅读全文
posted @ 2021-04-22 16:59 yongfengnice 阅读(964) 评论(0) 推荐(0) 编辑

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