工具
Y--Boy
因本人更换手机号码,原博客地址(https://blog.csdn.net/yan885283)登录不上,所以这个博客里很多文章是直接从原博客复制过来的,不是抄袭,谢谢!!
展开
-
RxJava2+retrofit简单使用,基于POST请求封装工具类
首先依赖// Android 支持 Rxjava// 此处一定要注意使用RxJava2的版本compile 'io.reactivex.rxjava2:rxjava:2.0.1'compile 'io.reactivex.rxjava2:rxandroid:2.0.1'// Android 支持 Retrofitcompile 'com.squareup.retrofit2:ret...原创 2019-02-27 16:12:37 · 510 阅读 · 0 评论 -
RecyclerView禁止滑动,包括横向和竖向的滑动
在网上找到的代码:public class CustomLinearLayoutManager extends LinearLayoutManager { private boolean isScrollEnabled = true; public CustomLinearLayoutManager(Context context) { super(co...原创 2019-02-27 16:21:52 · 2615 阅读 · 0 评论 -
android状态栏透明
/** * 状态栏透明 * @param activity */public static void transparencyBar(Activity activity){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = activity.getWind...原创 2019-02-27 16:28:46 · 214 阅读 · 0 评论 -
Glide4加载图片显示圆角和显示头像圆形图片
用于记录工具 /** * 加载圆形图片 * @param context * @param view * @param url */ public static void setCirclePicture(Context context, ImageView view, String url) { GlideApp.w...原创 2019-02-27 16:34:41 · 3030 阅读 · 2 评论 -
android状态栏透明
/** * * 状态栏透明 * * @param activity * */ public static void transparencyBar(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ...原创 2019-02-26 10:23:52 · 267 阅读 · 0 评论 -
Android颜色透明度百分比和十六进制对应关系
透明度 十六进制 100% FF 99% FC 98% FA 97% F7 96% F5 95% F2 94% F0 93% ED 92% EB 91% E8 90% E6 89% E3 88% E0 87% DE 86% DB 85% ...原创 2019-02-26 10:37:52 · 570 阅读 · 0 评论 -
Android点击软键盘外的区域,关闭软键盘
/** * 点击软键盘外面的区域关闭软键盘 * @param ev * @return */ @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { ...原创 2019-02-26 10:48:10 · 1562 阅读 · 1 评论 -
ProtectedApkResignerForWalle自动生成渠道包
github地址首先在位于项目的根目录build.gradle文件中添加Walle Gradle插件的依赖, 如下buildscript { dependencies { classpath 'com.meituan.android.walle:plugin:1.1.6' }}然后再当前App的build.gradle文件中apply这个插件...原创 2019-03-04 11:57:34 · 400 阅读 · 0 评论 -
TextView加载HTML,文字和图片
工具类:public class ImageGetterUtils { public static MyImageGetter getImageGetter(Context context, TextView textView) { MyImageGetter myImageGetter = new MyImageGetter(context, textView);...原创 2019-05-21 11:28:03 · 1943 阅读 · 5 评论