
android
wonderful_ha
这个作者很懒,什么都没留下…
展开
-
android View 事件处理流程
android中的事件类型分为按键事件和屏幕触摸事件,Touch事件是屏幕触摸事件的基础事件,有必要对它进行深入的了解。一个最简单的屏幕触摸动作触发了一系列Touch事件:ACTION_DOWN->ACTION_MOVE->ACTION_MOVE->ACTION_MOVE...->ACTION_MOVE->ACTION_UP当屏幕中包含一个ViewGroup,而这个ViewGrou转载 2012-04-11 22:04:02 · 953 阅读 · 0 评论 -
Github-Client(ANDROID)开源之旅(一) ------ 初探GitHub
Github-Client是Github 的一个开源的 Android 客户端,其本身也是基于很多很棒的开源软件进行开发如google-guice, ActionBarSherlock, Android-ViewPagerIndicator实为开源项目研究的不二之选,其官网下载地址:https://github.com/github/android不过要把这个工程跑起来可不转载 2013-08-08 15:09:38 · 981 阅读 · 0 评论 -
Activity的taskAffinity属性
Activity的归属,也就是Activity应该在哪个Task中,Activity与Task的吸附关系。我们知道,一般情况下在同一个应用中,启动的Activity都在同一个Task中,它们在该Task中度过自己的生命周期,这些Activity是从一而终的好榜样。 那么为什么我们创建的Activity会进入这个Task中?它们会转到其它的Task中吗?如果转到其它的Task中,转载 2012-06-14 10:33:35 · 543 阅读 · 0 评论 -
android 应用程序使用统计
//通过反射方法获得usagestats服务 Class cServiceManager = Class .forName("android.os.ServiceManager"); Method mGetService = cServiceManager.getMethod("getService",原创 2012-06-08 15:28:38 · 3052 阅读 · 12 评论 -
让应用程序申请root权限的代码
/** * 应用程序运行命令获取 Root权限,设备必须已破解(获得ROOT权限) * * @return 应用程序是/否获取Root权限 */public static boolean upgradeRootPermission(String pkgCodePath) { Process process = null; DataOutputStream os = nu转载 2012-06-13 11:34:53 · 2703 阅读 · 0 评论 -
9patch 在server端应用过程
two kinds 9patch:There are two types of ninepatch file formats in the Android world ("source" and "compiled"). The source version is where you add the 1px transparency border everywhere-- when you转载 2012-06-11 21:59:40 · 1635 阅读 · 0 评论 -
自动编译.9.png
.9.png文件是一种可以被android系统利用的可拉伸图片,可以使用draw9patch.bat工具处理普通的png文件来生成.9.png文件,这种经过处理的文件被称为.9.png的“源文件”,此时用图片浏览工具打开该文件可以看到图片的周围是一圈单像素,呈现黑色的像素点就是我们使用draw9patch.bat工具画上去的,当我们把图片放在res/drawable文件夹后,使用android编译转载 2012-06-11 21:36:41 · 1194 阅读 · 0 评论 -
7az 命令使用
7za 命令行详细介绍操作指令如下:a 添加到压缩文件b 基准测试,测试7z当前性能d 从压缩文件中删除e 从压缩文件中解压缩,但不包含目录结构(即所有各级文件都解压到一个目录里)l 列出压缩文件的内容t 测试压缩文件u 更新文件到压缩文件x 从压缩文件中解压缩,包含目录结构最常用的指令是a, l和x.例子:压缩a.txt和b.txt转载 2012-06-11 18:00:22 · 2885 阅读 · 0 评论 -
如何做换肤包
1. 如何做换肤包1) 最简单的方法是替换源码中的资源,然后重新编译a) 举例:修改系统公共资源——系统字体大小修改framework/base/core/res/res/values*/style.xml其中的TexAppearance的Large,Medium,Small的textSize,它们分别对应大中小字的字号修转载 2012-06-10 17:17:11 · 875 阅读 · 0 评论 -
Bitmap decode outof Memory
使用android提供的BitmapFactory解码一张图片时,有时会遇到该错误,即:java.lang.OutOfMemoryError: bitmap size exceeds VM budget。这往往是由于图片过大造成的。要想正常使用,一种方式是分配更少的内存空间来存储,即在载入图片的时候以牺牲图片质量为代价,将图片进行放缩,这也是不少人现在为避免以上的OOM所采用的解决方法。但是,这种转载 2012-04-17 13:17:58 · 796 阅读 · 0 评论 -
转换图片URI 变成绝对路径
// And to convert the image URI to the direct file system path of the image filepublic String getRealPathFromURI(Uri contentUri) { // can post image String [] proj={MediaStore.Images转载 2012-04-17 13:05:17 · 1671 阅读 · 0 评论 -
重绘child到指定位置(上下位置)
public void offsetChildrenTopAndBottom(int offset, int position) { final int count = getChildCount(); for (int i = 0; i < count; i++) { final View v = getChildAt(i); int top = v.ge原创 2012-04-28 14:00:01 · 912 阅读 · 0 评论 -
click 和 touch 区别
如果 在一个listView 中放置一个Button 会导致ListView 获得不到焦点解决方法: 给button 设置 button.setFouceable(false) button.setClickable(true) 这样listView中Button可以接收click事件,ListView也可以接收 onTouchEvent 事件。原创 2012-04-27 22:32:28 · 712 阅读 · 0 评论 -
智能眼镜前景
全球科技巨头Google、Apple在智能眼镜研发走在前列,分别推出了“ProjectGlass”和“iGlass”产品。如果仅知道这两家公司涉足智能眼镜,那么显然,你真OUT了。 日本相机制造商Olympus、法国Laster也纷纷加入了这场游戏。 Olympus最新发布的MEG4.0,显示屏通过蓝牙与智能手机或者平板电脑进行连接。该屏幕位于携带者视线的上方,利用内置加速计可转载 2013-09-03 14:42:45 · 1307 阅读 · 0 评论