- 博客(6)
- 收藏
- 关注
原创 Android项目mac迁徙到windows报错MalformedByteSequenceException:Invalid byte 3 of 3-byte UTF-8 sequence.]
1,项目从mac移到windows打包报错 Invalid byte 3 of 3-byte UTF-8 sequence在 org.gradle.jvmargs后添加 -Dfile.encoding=UTF-8,记住要加空格分隔,不然会报错。
2021-03-29 10:46:56
297
原创 Android 开发 Kotlin使用SignatureView实现画布签字
Android 开发 Kotlin使用SignatureView实现画布签字1,布局很简单,相对布局嵌套SigmatureView,再加两个确定按钮,重置按钮。pensize:画笔大小backgroundColor:背景颜色penColor:字体颜色这是凑字数的,告辞!<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sign="http://
2020-10-29 11:10:41
627
原创 Android面试的一些问题
一,说一下StringBuffer和StringBuilder的区别。答:1.StringBuffer是线程安全的,因为StringBuffer所有公开方法都是使用synchronized(用来控制线程同步的)修饰的。而StringBuilder并没有使用synchronized修饰。2.因为 StringBuffer 是线程安全的,它的所有公开方法都是同步的,所以使用会降低性能,StringBuilder 是没有对方法加锁同步的,所以StringBuilder 的性能要远大于 StringBuffer
2020-06-18 11:38:26
162
原创 Android 使用SurfaceView加载相机预览界面
使用SurfaceView加载相机预览界面1,添加相机权限 <uses-permission android:name="android.permission.CAMERA" />2,页面布局,因为我项目需要的是一个扫描页面,所以我在底布局下填充了一个SurfaceView <SurfaceView android:id="@+id/mSurfaceView" android:layout_width="match_parent"
2020-06-17 09:51:48
2259
原创 Kotlin自定义Dialog
Kotlin自定义Dialog 面对现在要求各异的开发要求,必须要会自定义各种弹窗,先来一个自定义dialog记录一下子。1,新建一个.kt 类继承Dialog,然后写一个布局,声明一下布局内对应的控件。 class SafeCenterDialog : Dialog { var tvTitle: TextView? = null var ivDialogIcon: ImageView? = null var tvDialogContent: TextVi
2020-06-16 09:00:13
2445
原创 EventBus的使用记录
EventBus的使用记录这是第一次尝试编写博客,先随便写一点。关于EventBus的介绍在这里多说了,网上随便一搜就说的很全面,这里主要记录自己使用的记录。1,添加依赖。implementation ‘org.greenrobot:eventbus:3.1.1’2,在页面注册事件订阅EventBus.getDefault().register(this)3,事件处理@Subscr...
2019-12-12 12:31:04
123
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人