- 博客(10)
- 资源 (1)
- 收藏
- 关注
转载 天气预报的免费接口api
http://www.sojson.com/open/api/weather/json.shtml?city=北京 { "data": { "yesterday": { "date": "20日星期四", "high": "高温 33℃", "fx": "西南风",
2017-07-21 09:52:14 575
原创 git did not exit cleanly (exit code 128)
之前使用过的git pull 代码,但是过了一个星期,修改了部分代码,又不想提交代码,所以把项目都删了,重新pull代码,发现 git did not exit cleanly (exit code 128)报这个错误,结果发现是管理没有给我相应权限。重新分配权限就Ok了
2017-07-11 12:26:07 905
转载 fresco 显示缩略图,不直接使用setImageURI,防止卡顿和显示不全:纯黑色或纯白色
//显示缩略图,不直接使用setImageURI,防止卡顿和显示不全:纯黑色或纯白色 FrescoUtils.showThumb(viewHolder.img_avatar, item.getFromportraitpicid(), 40, 40); public class FrescoUtils { private static boolean is
2016-08-01 09:47:14 5056 2
转载 java 验证手机号码
/** * 验证手机号码(1开头,11位数字,不验证第二位,防止新出的号段验证不通过) * * @param mobile * @return true 正确手机号码; false 不是手机号 */ public static boolean isMobile(String mobile) { // 代码来源:http://b
2016-07-21 16:11:14 1555
原创 android 自定义textview跑马灯效果
cc.healthbaby.util.AlwaysMarqueeTextView android:id="@+id/tv_pinkeshijian" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="2016/05/20 08:29"
2016-07-21 10:51:59 336
原创 json数组转成list表
/** * * * @param jsonArray * @param clazz * @param * @return */ public static T> ListT> jsonArrayToList(JSONArray jsonArray, ClassT> clazz) { if (jsonArray == null) { Log.w(TAG,
2016-07-19 15:00:11 979
原创 文本多于最大字数后用省略号来代替的的文字
/** * 获取的文本多于最大字数后用省略号来代替的的文字 * * @param text 原文 * @param maxNum * @return 原文的前maxNum字加上省略号 */ public static String getmaxNumText(String text, int maxNum) { if (isNotEmpty(text) && text.le
2016-07-19 14:58:13 792
原创 本地资源的图片文件 转换成bitmap
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.pic); //R.drawable.pic为图片的资源id
2016-07-19 14:50:26 658
原创 安卓分享纯图片
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.setType("image/*"); sendIntent.putExtra(Intent.EXTRA_STREAM, uri);//分享的图片的uri startActivity(sendIntent);
2016-07-19 14:47:15 318
原创 android simpledraweeview 获取已经加载的图片bitmap
Uri uri= Uri.parse(str_url);//str_url 你的url地址Bitmap bitmap =returnBitmap(uri); private Bitmap returnBitmap(Uri uri) { Bitmap bitmap = null; FileBinaryResource resource = (FileBinaryResou
2016-07-19 14:35:32 9201
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人