自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 问答 (1)
  • 收藏
  • 关注

原创 面试必备-ArrayList扩容分析

ArrayList 源码解析/** * Default initial capacity. * 默认的容量 */ private static final int DEFAULT_CAPACITY = 10; /** * Shared empty array instance used for empty instances. */ private static final Object[] EMPTY_ELEMENTDATA =

2020-05-12 09:16:15 295

原创 java 排序之插入排序

public class InseartSort { /** * @param sort 升序 * @return */ public void inseartSort(ArrayList sort) { if (sort == null || sort.size() == 0) { throw new Null

2017-09-20 21:58:35 313

原创 java排序之 选择排序

public class SelectionSort { /** * 降序 选择排序 * * * 此方法有个缺点 内层的每次比较都会交换数据 * * @param list */// public void sort(ArrayList list) {// int temp = 0;//

2017-09-20 17:26:47 384

原创 自定义LinkedList

/** * * MyLinkedDemo linkList 对比 ArrayList * ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构。 * 对于随机访问get和set,ArrayList觉得优于LinkedList,因为LinkedList要移动指针。 * 对于新增和删除操作add和remove,LinedList比较占优势,因为Array

2017-09-19 17:55:57 317

原创 android 悬浮通知

public class FloatView { TextView txtTitle; TextView txtContent; TextView txtTime; private String keyWord; private int type; private static Bundle bundle; private WindowMan

2017-09-14 15:01:35 1057

转载 android 修改viewpage滑动速度

1、自定义Scrollerpublic class ViewPageFixedSpeedScroller extends Scroller { private int mDuration = 300; public ViewPageFixedSpeedScroller(Context context) { super(context); // TO

2017-09-14 11:26:02 407

翻译 javaScript 继承

参考javaScript.高级程序设计

2017-09-13 16:27:27 180

原创 android 使用InputFilter 对金额和长度进行限制

public class MaxTextLengthFilter implements InputFilter { private int mMaxLength; private boolean isNum; private String note; private String message = null; /** * * @pa

2017-08-24 16:21:03 3384

原创 retrofit2拦截器处理401

在使用retrofit 请求的时候如果遇到了401怎么办?在每个请求之后都处理?那么这个就比较麻烦。我们可以在获取retrofit之前加入Interceptor,在1.9之前你可以使用RequestInterceptor来拦截一个请求,但在2.0这个被取消,现在我们必须转而使用okHttp的Interceptor。public WebService getmWebService() {

2017-02-07 17:34:46 6267

转载 自定义viewGroup childView的测量宽度时出现偏差 http://blog.csdn.net/u011102153/article/details/52245312

protected void measureChildWithMargins(View child,        int parentWidthMeasureSpec, int widthUsed,        int parentHeightMeasureSpec, int heightUsed) {    final MarginLayoutParams lp = (Margi

2016-09-13 23:26:18 575

原创 android自定义view-3d柱状图

最近,项目里需要加入3d柱状图展示数据,在网上找了找,发现和需求有点出入(可能自己没找对),于是就自己画了个,随便锻炼下自己,下面就把这个demo写出来。public class CustomBar extends View {    private Context mContext;    private Paint customPaint,customDrawPain, textPai

2016-05-02 09:55:50 1240

转载 http://www.nowamagic.net/librarys/veda/detail/1606

我们在使用CSS对网页元素定义样式时经常会遇到这种情况:要对一般元素应用一般样式,然后在更特殊的元素上覆盖它们。那么我们怎么样来保证我们所新定义的元素样式能覆盖目标元素上原有的样式呢?在CSS中,会根据选择器的特殊性来决定所定义的样式规则的次序,具有更特殊选择器的规则优先于具有一般选择器的规则,如果两个规则的特殊性相同,那么后定义的规则优先。那么,又怎么来计算选择器的特殊性呢?下面

2016-03-20 13:54:27 982

空空如也

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

TA关注的人

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