- 博客(8)
- 收藏
- 关注
原创 跑马灯textview
public class MarqueeTextView extends TextView { public MarqueeTextView(Context con) { super(con); } public MarqueeTextView(Context context, AttributeSet attrs) { super(context, a
2017-10-30 11:28:48
286
原创 判断字符串中是否有特殊字符
public static boolean isHasSpecialSymbol(String code){ String regEx = "[`~!@#$%^&*()+=|{}':',\\[\\].; Pattern pattern = Pattern.compile(regEx); Matcher matcher = pattern.matcher(code);
2017-10-30 11:03:37
3513
原创 圆形图片ui
/* * Copyright 2014 - 2016 Henning Dodenhof * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain
2017-08-29 11:00:24
300
原创 安卓流布局
package com.ui;import android.content.Context;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Paint.Style;import android.util.
2017-08-29 10:59:30
423
原创 android-获取设备id
String str = android.provider.Settings.Secure.getString(context.getContentResolver(),android.provider.Settings.Secure.ANDROID_ID);
2017-07-24 10:29:33
792
原创 反破解
/** * 检测软件是否被调试连接的方法 * */ public static boolean isDebuggerConnected() { return android.os.Debug.isDebuggerConnected(); } /** * 检测软件是否运行在模拟器中的方法 * */
2017-07-24 10:20:12
370
原创 List判空
做代码review的时候,同事偶然间说起List判空的事,平时我也是这么判断的:if(list == null || list.size() == 0),考虑到性能问题,建议用list.isEmpty()这个方法,此方法是判断list有没有元素,而size()方法会遍历一遍list,所以自然list.isEmpty()这个方法性能更高一点。希望各位程序员们,从点滴坐起,每天进步一点点
2017-06-26 11:05:08
489
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅