随笔分类 -  工具类

上一页 1 2 3 4 5 6 7 下一页
ProgressBar 进度条设置百分比显示
摘要:rawable/progressbar 1 2 3 4 5 6 7 13 14 15 16 17 18 ... 阅读全文
posted @ 2015-09-11 11:04 大米稀饭 阅读(5201) 评论(0) 推荐(0)
自定义控件 --- 加载旋转图标
摘要:1 import android.annotation.TargetApi; 2 import android.content.Context; 3 import android.content.res.Resources; 4 import android.content.res.T... 阅读全文
posted @ 2015-09-10 17:25 大米稀饭 阅读(643) 评论(0) 推荐(0)
拍照 和 选择相册 设置背景图片
摘要:1 package com.testCarema.android; 2 3 import android.app.Activity; 4 import android.app.AlertDialog; 5 import android.content.ContentResolver; ... 阅读全文
posted @ 2015-08-28 14:40 大米稀饭 阅读(664) 评论(0) 推荐(0)
发送验证码
摘要:1 CountDownTimer countDownTimer = new CountDownTimer(60000,1000) { 2 3 @Override 4 public void onTick(long millisUntilFinished) { 5 ... 阅读全文
posted @ 2015-08-27 10:01 大米稀饭 阅读(192) 评论(0) 推荐(0)
FileToolkit 文件工具箱
摘要:1 import org.apache.commons.io.FileUtils; 2 import org.apache.commons.io.filefilter.*; 3 import org.apache.commons.logging.Log; 4 import org.a... 阅读全文
posted @ 2015-08-27 09:12 大米稀饭 阅读(460) 评论(0) 推荐(0)
NetWorkUtil
摘要:1 import java.io.IOException; 2 import java.io.UnsupportedEncodingException; 3 4 import org.apache.http.HttpEntity; 5 import org.apache.http.H... 阅读全文
posted @ 2015-08-27 09:10 大米稀饭 阅读(393) 评论(0) 推荐(0)
对图片进行管理的工具类
摘要:import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.util.LruCache;/** * 对图片进行管理的工具类。 * * @author Tony */public class ... 阅读全文
posted @ 2015-08-27 09:04 大米稀饭 阅读(217) 评论(0) 推荐(0)
StringUtils 时间显示,判断手机号,电子邮件,是否为今日,是否空白串,字符串转整数,对象转整数 等
摘要:1 package com.xiaoyun.org.util; 2 3 import java.io.BufferedReader; 4 import java.io.IOException; 5 import java.io.InputStream; 6 import java.i... 阅读全文
posted @ 2015-08-27 09:03 大米稀饭 阅读(607) 评论(0) 推荐(0)
50、Toast自定义布局
摘要:1 2 4 6 8 1 2 14 19 27 1 Toast toast = new Toast(mActivity); 2 View view = LayoutInflater.from(mActivity).inflate(R.layout.my_cente... 阅读全文
posted @ 2015-08-26 17:14 大米稀饭 阅读(409) 评论(0) 推荐(1)
String的replaceAll方法中的正则表达式用法
摘要:项目里面 需要对已手机号码进行 如下的显示比如15088688388 要显示为150****8388的效果实现这个简单的效果 方法有很多我想试试用正则表达式去实现查了点资料最终试出来以下方法可行System.out.println("15088688388".replaceAll("(\\d{3})... 阅读全文
posted @ 2015-07-29 16:16 大米稀饭 阅读(1458) 评论(0) 推荐(0)
46、PopWindow工具类
摘要:1 public class StudentPopWindow extends PopupWindo... 阅读全文
posted @ 2015-07-27 11:14 大米稀饭 阅读(455) 评论(0) 推荐(0)
解决Android SDK下载和更新失败的方法(Win系统) 和离线安装
摘要:http://jingyan.baidu.com/article/a3a3f811f370558da2eb8a94.html http://jingyan.baidu.com/article/636f38bb267982d6b84610f0.html android sdk离线安装 转载请标明出处: 阅读全文
posted @ 2015-07-20 17:02 大米稀饭 阅读(226) 评论(0) 推荐(0)
43、android:screenOrientation
摘要:android:screenOrientationThe orientation of the activity's display on the device.The value can be any one of the following strings:"unspecified"The de... 阅读全文
posted @ 2015-07-15 14:35 大米稀饭 阅读(175) 评论(0) 推荐(0)
42、使用存放在存assets文件夹下的SQLite数据库
摘要:因为这次的项目需要自带数据,所以就就把数据都放到一个SQLite的数据库文件中了,之后把该文件放到了assets文件夹下面。一开始打算每次都从assets文件夹下面把该文件夹拷贝到手机的SD卡或者手机自身的存储上之后再使用,后来考虑到每次都拷贝的话效率不高,并且如果涉及到对数据库的修改操作的话拷贝之... 阅读全文
posted @ 2015-07-14 10:15 大米稀饭 阅读(522) 评论(0) 推荐(0)
用Java来写常见的排序算法
摘要:/** * 各种排序算法 * * @author huwei * */public class Sort { public static void main(String[] args) { int[] a = { 60, 57, 89, 47, 57, 98, 45, 35, ... 阅读全文
posted @ 2015-07-08 14:35 大米稀饭 阅读(200) 评论(0) 推荐(0)
Android高手速成
摘要:第一部分 个性化控件(View) http://www.cnblogs.com/huwei0814/p/3796659.html第二部分 工具库 http://www.cnblogs.com/huwei0814/p/3796670.html第三部分 优秀项目 http://www.cnblo... 阅读全文
posted @ 2015-07-08 14:31 大米稀饭 阅读(233) 评论(0) 推荐(0)
16进制 ,Color,Colour转换
摘要:1 import java.awt.Color; 2 import jxl.format.Colour; 3 4 public class ColorUtil { 6 public static Colour getNearestColour(Color awtColor) { ... 阅读全文
posted @ 2015-07-08 14:22 大米稀饭 阅读(820) 评论(0) 推荐(0)
截取字符串替换成星号
摘要:1 public class TestDemo8 { 2 3 final static String STARS = "*******************************"; 4 5 public static void main(String[] args) { ... 阅读全文
posted @ 2015-06-23 16:56 大米稀饭 阅读(2155) 评论(0) 推荐(0)
Android设备各种使用尺寸整理
摘要:// 获取屏幕的宽度、高度Display defDip = getWindowManager().getDefaultDisplay();int disWidth = defDip.getWidth();int disHeight = defDip.getHeight();Log.i("TAG", ... 阅读全文
posted @ 2015-06-16 10:42 大米稀饭 阅读(435) 评论(0) 推荐(0)
让Fragment监听返回键
摘要:Activity可以很容易的得到物理返回键的监听事件,而Fragment却不能。所以使用到了以下的方法。 首先创建一个抽象类BackHandledFragment,该类有一个抽象方法onBackPressed(),所有BackHandledFragment的子类在onBackPressed方法中处... 阅读全文
posted @ 2015-06-15 13:16 大米稀饭 阅读(864) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 下一页