自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 单例File Teamplates

public class $class{ private $class() { } private static class SingletonInstance { private static final $class INSTANCE = new $class(); } public static $class getInstance() { return SingletonInstance.INSTANCE; } ...

2021-03-06 10:50:58 84

原创 解决7.x版本 WindowManager$BadTokenException

public class ToastWiget { private static Toast mToast; //解决7.x WindowManager$BadTokenException //避免多次反射 private static boolean isReflectedHandler = false; public static void ma...

2018-08-14 18:54:04 355

原创 解决EditText不自动获取焦点的方法

android:focusable="true" android:focusableInTouchMode="true"在父容器内添加属性即可

2018-07-12 22:37:55 718

原创 关于TextView的默认padding问题

1,TextView自带的paddding用includeFontPadding = false无法消除,这个padding应该是6px2,消除的途径Paint.FontMetricsInt fontMetricsInt;if (fontMetricsInt == null){ fontMetricsInt = new Paint.FontMetricsInt(); getPain...

2018-07-10 23:46:55 789

原创 自定义横向ProgressBar

<!--进度条--><style name="StyleProgressBarMini" parent="@android:style/Widget.ProgressBar.Horizontal"> <item name="android:maxHeight">50dip</item> <item name

2018-07-10 21:23:33 471

转载 更改打包输出信息

android { // rename the apk with the version name applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File( o...

2018-06-11 18:58:51 133

原创 ImageSpan使用时的坑(绘制出来图片大小不对的问题)

最近项目中用到图片加文字作为文本插入edittext中,删除添加时最为一个整体.就自然想到了ImageSpan的做法,但是使用new ImageSpan(Bitmap b)的时候遇到了很蒙蔽的问题,就是Bitmap放进去的时候老是发生缩放,刚开始尝试手动缩放,但是适配不了所有机型.就尝试看了下ImageSpan的内部处理方法. public ImageSpan(Context conte...

2018-06-11 16:19:32 6078

翻译 RecyclerView的adapter的问题

项目刚上线,bugly上面就一堆RecyclerView的越界异常.部门大佬提交一个版本的修复上去,将原来使用的position全部替换成了holder.getLayoutPosition(),还是有异常发生.无奈去看了adapter中对于getLayoutPosition()以及getAdapterPosition()的说明以及场景./** * Returns the position of ...

2018-05-21 15:48:37 371

空空如也

空空如也

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

TA关注的人

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