- 博客(10)
- 问答 (1)
- 收藏
- 关注
原创 Module was compiled with an incompatible version of Kotlin 问题解决
Module was compiled with an incompatible version of Kotlin
2022-09-15 17:13:35
941
原创 Android崩溃异常捕获实时上报钉钉
这两天看到一个有意思的接口Thread.UncaughtExceptionHandler,能检测出项目中未捕获的崩溃异常,结合钉钉机器人就能够实时上报异常,即时处理。1、首先,在application中设置捕获异常处理程序Thread.setDefaultUncaughtExceptionHandler,2、在uncaughtException处理异常,未防止程序崩溃无法日志上传失败,通过service处理。这里偷懒就直接由application继承。...
2022-07-27 14:38:21
806
1
原创 ObservableField set 延迟问题
先说结论 ObservableField 一般用于 dataBing 交互式绑定。 ObservableField.set() 从时效性来说并不等同于 TextView.setText()。 举个简单例子
2022-05-09 14:14:00
939
1
原创 dialog莫名崩溃解决方案
最近没有改动项目里Dialog框架代码,却莫名崩溃,看了一下androidx更新了,具体源码没有查看,直接给出解决方案: 代码里可见 onActivityCreated()函数已经过时,将requestFeature(Window.FEATURE_NO_TITLE) 函数移至 onCreateView()即可。 ...
2021-07-30 17:09:58
519
原创 FlutterFragment第一次显示时闪现黑屏
百度下来解决的都是FlutterActivity黑屏的解决方法,并不适用于FlutterFragment,区别在于FlutterActivity实现了SplashScreenProvider接口。 FlutterFragment源码贴上 @Nullable public SplashScreen provideSplashScreen() { FragmentActivity parentActivity = this.getActivity(); if (parentActivi.
2021-07-30 16:44:30
443
原创 LiveData 粘性事件解决方案 附:简易LiveDataBus
** LiveData 粘性事件解决方案 附:简易LiveDataBus ** **LiveData源码分析** private void considerNotify(LiveData.ObserverWrapper observer) { if (!observer.mActive) { return; } // Check latest state b4 dispatch. Mayb...
2021-06-29 16:57:59
1290
原创 打开相机获取图片路径
package com.sprout.rxjava; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintSet; import androidx.core.app.Act.
2021-03-26 16:18:44
26074
原创 打开相册多选视频及照片
打开相册多选视频及照片 1.依赖 //图片选择器 implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0' //Glide 4.x implementation 'com.github.bumptech.glide:glide:4.11.0' 2.仓库 maven { url 'https://jitpack.io' } 3.跳转相册 private void selectImage().
2021-03-25 11:13:29
1217
原创 实现动态添加自定义View到约束布局(constraints )--------附:自定义可拖拽View
实现动态添加自定义TagView到约束布局(constraints ) ConstraintSet constraints = new ConstraintSet(); constraints.clone(constraint); // Define our ImageView and add it to layout TagView imageView = new TagView(MainActivity.this); .
2021-03-24 09:44:41
693
原创 解决RecyclerView条目复用问题,实现添加文本框效果
import android.app.Activity; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.Toast; impor...
2021-01-06 11:44:59
443
空空如也
aspect织入lambda失败
2021-12-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅