03 2016 档案

摘要:((Button) v).getCompoundDrawables()[1].setColorFilter(new ColorMatrixColorFilter(BT_NOT_SELECTED)); android 使用ColorMatrix把图变成灰色 阅读全文
posted @ 2016-03-31 14:15 wikiki 阅读(448) 评论(0) 推荐(0)
摘要:extends:http://blog.csdn.net/alvinhuai/article/details/8955127,http://mikespook.com/2010/11/android-%E5%AE%9E%E6%97%B6%E8%8E%B7%E5%8F%96%E9%BA%A6%E5%8 阅读全文
posted @ 2016-03-31 13:46 wikiki 阅读(4757) 评论(0) 推荐(0)
摘要:byte数组和short数组转换 阅读全文
posted @ 2016-03-31 13:42 wikiki 阅读(7138) 评论(0) 推荐(0)
摘要:最近在搞毕业设计,做的是有关语音识别的手机应用。在处理音频的过程中,发现需要用short数组处理音频,可能光用byte会越界。但是java读文件没有一次性读到short数组中的api,要么是一个一个读short,要么读到byte数组后人工转为short数组。前者的行为和c++行为正好相反,主要是高低 阅读全文
posted @ 2016-03-31 13:41 wikiki 阅读(2723) 评论(0) 推荐(0)
摘要:System.out.println(TextUtils.isEmpty(null)); System.out.println(TextUtils.isEmpty("")); 阅读全文
posted @ 2016-03-21 17:12 wikiki 阅读(181) 评论(0) 推荐(0)
摘要:JSONArray ja = new JSONArray(); ja.put("11"); ja.put("22"); ja.put("33"); JSONArray ja2 = new JSONArray(); ja2.put("aa"); ja2.put(... 阅读全文
posted @ 2016-03-21 17:10 wikiki 阅读(185) 评论(0) 推荐(0)
摘要:/** * 生成随机文件名:当前年月日时分秒+五位随机数 * * @return */ public static String getRandomFileName() { SimpleDateFormat simpleDateFormat; simpleDateFormat =... 阅读全文
posted @ 2016-03-21 15:38 wikiki 阅读(1338) 评论(0) 推荐(0)
摘要://android把图片文件添加到相册 public static ContentValues getImageContentValues(Context paramContext, File paramFile, long paramLong) { ContentValues localConte 阅读全文
posted @ 2016-03-21 15:37 wikiki 阅读(9155) 评论(0) 推荐(0)
摘要://横竖屏切换 阅读全文
posted @ 2016-03-21 14:40 wikiki 阅读(786) 评论(0) 推荐(0)
摘要:几个方法介绍: 1.setMax() 设置对话框中进度条的最大值。 2.setTile() 设置标题。 3.setProgressStyl() 设置对话框中进度条的样式。例如:环形和水平。 参数: ProgressDialog.STYLE_SPINNER 环形精度条 ProgressDialog.S 阅读全文
posted @ 2016-03-20 20:04 wikiki 阅读(128) 评论(0) 推荐(0)
摘要:View.inflate(this, R.layout.aactivity_temp_web, null); LayoutInflater.from(this).inflate(R.layout.dialog_add_compont, null); 阅读全文
posted @ 2016-03-15 23:02 wikiki 阅读(151) 评论(0) 推荐(0)
摘要:  阅读全文
posted @ 2016-03-14 20:49 wikiki 阅读(921) 评论(0) 推荐(0)
摘要:在介绍之前,我们需要先了解默认情况下android屏幕旋转的机制: 默认情况下,当用户手机的重力感应器打开后,旋转屏幕方向,会导致当前activity发生onDestroy-> onCreate,这样会重新构造当前activity和界面布局,如果在Camera界面,则表现为卡顿或者黑屏一段时间。如果 阅读全文
posted @ 2016-03-08 15:43 wikiki 阅读(3628) 评论(0) 推荐(0)
摘要:很多朋友在开发Android JNI的的时候,会遇到findlibrary returned null的错误,因为某种原因,so没有打包到apk中。下面浅析下引起该错误的原因以及平台兼容性问题。 一、没有将so打包到apk中的原因。 当你发现到findlibrary returned null的错误 阅读全文
posted @ 2016-03-07 17:59 wikiki 阅读(321) 评论(0) 推荐(0)