自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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 847 1

原创 Android崩溃异常捕获实时上报钉钉

这两天看到一个有意思的接口Thread.UncaughtExceptionHandler,能检测出项目中未捕获的崩溃异常,结合钉钉机器人就能够实时上报异常,即时处理。1、首先,在application中设置捕获异常处理程序Thread.setDefaultUncaughtExceptionHandler,2、在uncaughtException处理异常,未防止程序崩溃无法日志上传失败,通过service处理。这里偷懒就直接由application继承。...

2022-07-27 14:38:21 654 1

原创 ObservableField set 延迟问题

先说结论ObservableField 一般用于 dataBing 交互式绑定。ObservableField.set() 从时效性来说并不等同于 TextView.setText()。举个简单例子

2022-05-09 14:14:00 828

原创 dialog莫名崩溃解决方案

最近没有改动项目里Dialog框架代码,却莫名崩溃,看了一下androidx更新了,具体源码没有查看,直接给出解决方案:代码里可见 onActivityCreated()函数已经过时,将requestFeature(Window.FEATURE_NO_TITLE) 函数移至 onCreateView()即可。...

2021-07-30 17:09:58 388

原创 FlutterFragment第一次显示时闪现黑屏

百度下来解决的都是FlutterActivity黑屏的解决方法,并不适用于FlutterFragment,区别在于FlutterActivity实现了SplashScreenProvider接口。FlutterFragment源码贴上@Nullablepublic SplashScreen provideSplashScreen() { FragmentActivity parentActivity = this.getActivity(); if (parentActivi.

2021-07-30 16:44:30 334

原创 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 1134

原创 打开相机获取图片路径

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 25893

原创 打开相册多选视频及照片

打开相册多选视频及照片1.依赖//图片选择器implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0'//Glide 4.ximplementation 'com.github.bumptech.glide:glide:4.11.0'2.仓库maven { url 'https://jitpack.io' }3.跳转相册private void selectImage().

2021-03-25 11:13:29 976

原创 实现动态添加自定义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 560

原创 解决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 362

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除