05 2022 档案
摘要:/** * Created by tab on 2020/4/30. */ public class TabLabelsView extends ViewGroup implements View.OnClickListener { private Context mContext; private
阅读全文
摘要:/** * 倒计时类 * * @author tab */ public class TimerDownTab extends CountDownTimer { private TimerDownListener listener; public interface TimerDownListene
阅读全文
摘要:/** * Created by tab on 2017/10/10 */ public class Base64Encoder extends FilterOutputStream { private static final char[] chars = {'A', 'B', 'C', 'D',
阅读全文
摘要:/** * 身份证验证 * Created by tab on 2019/04/04 */ public class IdCardUtil { private String idCardNum = null; private static int IS_EMPTY = 1; private stat
阅读全文
摘要:/** * 软键盘操作类 * 功能描述: * 1、打开软键盘 showSoftInput(EditText,Activity) or showSoftInput(Activity); * 2、关闭软键盘 closeSoftInput(EditText,Activity) or closeSoftIn
阅读全文
摘要:/** * 时间工具类 * 1、String类型的日期时间转化为Date类型 getDateByFormat("2016-04-15 12:20:11","yyyy-MM-dd HH:mm:ss"); * 2、获取Date偏移之后的Date getDateByOffset(date,Calendar
阅读全文
摘要:1.根目录 settings.gradle pluginManagement { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' allowInsecureProtocol = tru
阅读全文
摘要:ThreadPoolExecutor构造方法 @Test public void ThreadPoolTest() { ExecutorService executor = new ThreadPoolExecutor( //corePoolSize:核心线程数 3, //maximumPoolSi
阅读全文
摘要:基本使用 fun okhttp3Demo() { val client: OkHttpClient = OkHttpClient.Builder().build()//创建OkHttpClient val r: Request = Request.Builder().url("").build()/
阅读全文
摘要:使用测试代码 class ExtendTest { @Test fun letDemo() { val user = UserInfo() val result = user.let { it.name = "name1" it.age = 20 it.show() 80 } println("re
阅读全文
摘要:分类:强引用(Strong Reference)、软引用(Soft Reference)、若引用(Weak Reference)、虚引用(Phantom Reference) 强引用 java默认引用方式,只要引用链存在,系统哪怕OOM都不会回收 软引用 SoftReference<T> SoftR
阅读全文
摘要:Handler源码的几个核心类 Handler、Message、Looper、MessageQueue Handler发送到收到回调的完整流程 Handler 1:Handler的构造函数 public Handler(@NonNull Looper looper, @Nullable Callba
阅读全文