[置顶] android里的继承浅析

摘要: 先看一段代码:abstract class A{ public A(){ this.print(); } public abstract void print();}class B extends A{ private int x=100; public B(int x){ this.x=x; } public void print(){ Sys... 阅读全文

posted @ 2013-10-26 16:07 liyanqingyang 阅读(598) 评论(0) 推荐(1) 编辑

2012年12月18日

Android查询短信数据库

摘要: 查询短信数据库:String strUriInbox = "content://sms";Uri uriSms = Uri.parse(strUriInbox);Cursor c_groups = managedQuery( uriSms , new String[] { "date","person" }, select, null, "date DESC");strColumnName=_id strColumnValue=48 //短消息序号strColumnName=thread_id strColumnV 阅读全文

posted @ 2012-12-18 18:54 liyanqingyang 阅读(263) 评论(0) 推荐(0) 编辑

2012年11月20日

判断手机是否root了

摘要: 1 public synchronized boolean getRootAhth() 2 { 3 Process process = null; 4 DataOutputStream os = null; 5 try 6 { 7 process = Runtime.getRuntime().exec("su"); 8 os = new DataOutpu... 阅读全文

posted @ 2012-11-20 15:15 liyanqingyang 阅读(531) 评论(0) 推荐(0) 编辑

2012年11月16日

/bin/bash: /usr/bin/make: Permission denied

摘要: 互芯编译时突然出现/bin/bash: /usr/bin/make: Permission denied的错。网上多说是权限的原因,反正没解决。后来new了一下好了,所以出现这种情况就clean lod 阅读全文

posted @ 2012-11-16 18:25 liyanqingyang 阅读(3728) 评论(0) 推荐(1) 编辑

2012年11月13日

PreferenceActivity详解

摘要: 为了引入这个概率 首先从需求说起 即:现有某Activity专门用于手机属性设置 那么应该如何做呢?根据已学知识 很快一个念头闪过 即:Activity + Preference 组合 前者用于界面构建 后者用于设置数据存放 其实 这是正确的 但是 这会比较繁琐 因为 每个设置选项 都要建立与其对应的Preference所以 现在有更好的选择了 那就是本文的主角:PreferenceActivity从名字应该可以看出 其实 Activity 与 Perference 的混合物还是从需求说起 常见属性设定 有哪几种方式:1. CheckBox 用于 确定/取消 某项功能 如:是否静音 对应于:C 阅读全文

posted @ 2012-11-13 11:11 liyanqingyang 阅读(458) 评论(0) 推荐(1) 编辑

2012年11月1日

在android工程中导入layoutlib.jar

摘要: layoutlib.jar里有很多系统的api,在默认的工程里是没有的导入方法:1. Right-click the project in Eclipse and select "Build Path -> Add Libraries...".2. Select User Library from the list and click Next.3. Click the "User Libraries..." button.4. Click "New..." in the User Libraries dialog.5. Giv 阅读全文

posted @ 2012-11-01 13:27 liyanqingyang 阅读(3438) 评论(0) 推荐(0) 编辑

2012年10月26日

【转】 android 悬浮窗口的拖动

摘要: 1 package net.xsmile.fv; 2 3 4 import android.app.Application; 5 import android.view.WindowManager; 6 7 8 public class MyApplication extends Application { 9 10 /**11 * 创建全局变量12 * 全局变量一般都比较倾向于创建一个单独的数据类文件,并使用static静态变量13 * 14 * 这里使用了在Application中添加数据的方法实现全局变量15 *... 阅读全文

posted @ 2012-10-26 17:09 liyanqingyang 阅读(4536) 评论(1) 推荐(0) 编辑

导航