<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[mawl2002的专栏]]></title><description><![CDATA[心情驿站]]></description><link>https://blog.csdn.net/mawl2002</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; mawl2002]]></copyright><item><title><![CDATA[Android中设计模式无处不在之单例模式]]></title><link>https://blog.csdn.net/mawl2002/article/details/6174811</link><guid>https://blog.csdn.net/mawl2002/article/details/6174811</guid><author>mawl2002</author><pubDate>Tue, 08 Feb 2011 19:22:00 +0800</pubDate><description><![CDATA[单例模式使用比较常见，用来保证一个类仅有一个实例，并提供一个访问它的全局访问点。在Android application包中有个Bluetooth相关的包就用到了单例模式，实例代码如下：      public class BluetoothOppManager {      private static BluetoothOppManager INSTANCE;  /** Used when obtaining a reference to the singleton instance. */      ]]></description><category></category></item><item><title><![CDATA[Android中设计模式无处不在之简单工厂模式和代理模式]]></title><link>https://blog.csdn.net/mawl2002/article/details/6173962</link><guid>https://blog.csdn.net/mawl2002/article/details/6173962</guid><author>mawl2002</author><pubDate>Mon, 07 Feb 2011 19:38:00 +0800</pubDate><description><![CDATA[<br />最近在研究一些具体的设计模式，结合之前看到很多Android中java代码，发现在Android源码中使用设计模式的地方还真不少啊，好的系统果然要注重好的设计，注重可扩展、可维护。本次就从PhoneService中使用到的一些简单的设计模式类型开始介绍：<br /> <br />1.简单工厂模式：<br /><br />注：个人觉得这个工厂模式和标准的工厂模式有点稍微差别，标准的是有客户端来决定创建哪个实例，例如，要使用GSMPhone的话，一般使用Phone phone = PhoneFact]]></description><category></category></item><item><title><![CDATA[Android中PIN和PUK码解锁研究]]></title><link>https://blog.csdn.net/mawl2002/article/details/6171014</link><guid>https://blog.csdn.net/mawl2002/article/details/6171014</guid><author>mawl2002</author><pubDate>Mon, 31 Jan 2011 17:09:00 +0800</pubDate><description><![CDATA[<br /><br />由于目前手头没有真机，只是在模拟器上修改部分telephony代码来调出请求输入PIN码的界面。具体方法：修改external/qemu/telephony/sim_card.c中的asimcard_create()函数，将card->status
= A_SIM_STATUS_READY改为card->status
= A_SIM_STATUS_PIN，然后重新编译代码生成image，启动模拟器就直接进入PIN码解锁界面。<br /> <br />        
PIN码解]]></description><category></category></item><item><title><![CDATA[UML中几种类图的定义和表示]]></title><link>https://blog.csdn.net/mawl2002/article/details/6125153</link><guid>https://blog.csdn.net/mawl2002/article/details/6125153</guid><author>mawl2002</author><pubDate>Sun, 09 Jan 2011 13:09:00 +0800</pubDate><description><![CDATA[我们知道，面向对象的特性就是封装、继承和多态，而为了使这些关系呈现的更加清晰，经常采用UML类图的形式来表示。常见的几种关系如下：1. 类（Class）： 表示对某种对象的封装。具体表示如下图，其中，最上面一格代表类名，斜体表示该类为抽象类；第二格表示该类的特性，就是常说的字段和属性；第三格表示类的操作，即方法和行为。前面的+号表示public，-表示private，#表示protected。2. 接口（Interface）： 是指一系列方法的声明，没有实现，实现该接口的类负责实现该接口的方法。 其中，最上]]></description><category></category></item><item><title><![CDATA[Android中如何实现高亮显示即选中状态]]></title><link>https://blog.csdn.net/mawl2002/article/details/6120629</link><guid>https://blog.csdn.net/mawl2002/article/details/6120629</guid><author>mawl2002</author><pubDate>Thu, 06 Jan 2011 16:13:00 +0800</pubDate><description><![CDATA[好久没不做Android的界面就是手生，为了搞下图的效果整了好半天，不过还好最终搞定了。1.声明明你的layout,并将如下的背景xml设置上去：]]></description><category></category></item><item><title><![CDATA[Android如何预置数据库或库文件]]></title><link>https://blog.csdn.net/mawl2002/article/details/6118522</link><guid>https://blog.csdn.net/mawl2002/article/details/6118522</guid><author>mawl2002</author><pubDate>Wed, 05 Jan 2011 17:44:00 +0800</pubDate><description><![CDATA[<br />我们在做Android应用开发的时候经常会用到预置数据库或者使用一个现有的第三方的动态或静态库的方式进行开发，这时候就需要一些修改Makefile文件将预置的数据或库文件拷贝到指定目录中。一个比较简单的方式如下：<br />##copy operation####<br />include $(CLEAR_VARS)<br /> <br />#the data or lib you want to copy<br />LOCAL_MODULE := libxxx.so<br /> <br />L]]></description><category></category></item><item><title><![CDATA[基于Android源码开发的来电接通振动功能实现]]></title><link>https://blog.csdn.net/mawl2002/article/details/6070056</link><guid>https://blog.csdn.net/mawl2002/article/details/6070056</guid><author>mawl2002</author><pubDate>Sat, 11 Dec 2010 20:45:00 +0800</pubDate><description><![CDATA[  我们在使用HTC的GXX时，会发现他有一个功能是接通后振动提示，虽然说不是什么大的功能，但是使用比较方便，比如在呼叫过程中的时候就可以放在桌子上等振动了就说明电话被接通了再拿起来说话，就避免了一直放到耳边等待对方。具体的实现如下，当然实现方式可能和它不一样，但是效果一样，呵呵。由于我们是基于源码开发的，所以只讨论在PhoneApp里面添加该功能，独立模块或者基于SDK开发的不讨论。注意修改PhoneApp模块中的CallNotify.java文件。1. 声明Vibrartor相关变量：// Call a]]></description><category></category></item><item><title><![CDATA[Android Button及TextView动态变换颜色]]></title><link>https://blog.csdn.net/mawl2002/article/details/6004585</link><guid>https://blog.csdn.net/mawl2002/article/details/6004585</guid><author>mawl2002</author><pubDate>Fri, 12 Nov 2010 11:47:00 +0800</pubDate><description><![CDATA[<br />做android应用程序，为了达到更好的用户交互效果，经常需要改变Button的背景颜色以及TextView的字体颜色来提示用户当前的菜单可操作的状态，对此android提供了一种定义一种selector的方法让程序员提前配置好背景和色值，具体的方法如下：<br />一.Button(ImageButton、ImageView包括一般的view、ViewGroup都可以同样操作)：<br />1.首先在你的layout文件中为Button添加background属性，比如android:back]]></description><category></category></item><item><title><![CDATA[适配不同分辨率&hdpi、mdpi、ldpi&横屏竖屏()]]></title><link>https://blog.csdn.net/mawl2002/article/details/5989207</link><guid>https://blog.csdn.net/mawl2002/article/details/5989207</guid><author>mawl2002</author><pubDate>Fri, 05 Nov 2010 10:55:00 +0800</pubDate><description><![CDATA[目录1 一：不同的layout  2 二：hdpi、mdpi、ldpi  3 三：横屏竖屏   编辑本段 回目录一：不同的layoutAndroid手机屏幕大小不一，有480x320, 640x360, 800x480.怎样才能让App自动适应不同的屏幕呢？其实很简单，只需要在res目录下创建不同的layout文件夹，比如layout-640x360,layout-800x480,所有的layout文件在编译之后都会写入R.Java里，而系统会根据屏幕的大小自己选择合适的layout进行使用。 编辑本段 回]]></description><category></category></item><item><title><![CDATA["Could not create java virtual machine"的问题解决]]></title><link>https://blog.csdn.net/mawl2002/article/details/5914788</link><guid>https://blog.csdn.net/mawl2002/article/details/5914788</guid><author>mawl2002</author><pubDate>Wed, 29 Sep 2010 17:44:00 +0800</pubDate><description><![CDATA[<br />今天到了新的环境，需要重新搭建Android的开发环境，下载eclipse并安装了JDK1.6后，启动eclipse，发现出现了错误“Could not create java virtual machine”，点击就立即关闭了。<br /> <br />解决办法如下，打开eclipse目录下的eclipse.ini文件：<br />-startup<br />plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar<br />--laun]]></description><category></category></item><item><title><![CDATA[使用for循环代替while循环的场合]]></title><link>https://blog.csdn.net/mawl2002/article/details/5902968</link><guid>https://blog.csdn.net/mawl2002/article/details/5902968</guid><author>mawl2002</author><pubDate>Fri, 24 Sep 2010 10:56:00 +0800</pubDate><description><![CDATA[<br />1.在循环终止之后，不需要使用循环变量；<br />for (Element e : c) {
    doSomething(e);
} <br />但是跳出for循环之后，变量的作用域就存在了。<br />2.易于较早发现程序中的错误；<br />Iterator<Element> i = c.iterator();
while(i.hasNext()) {
    doSomething(i.next());
}
...
Iterator<Element> i2 = c.it]]></description><category></category></item><item><title><![CDATA[Android CTS]]></title><link>https://blog.csdn.net/mawl2002/article/details/5886640</link><guid>https://blog.csdn.net/mawl2002/article/details/5886640</guid><author>mawl2002</author><pubDate>Wed, 15 Sep 2010 18:16:00 +0800</pubDate><description><![CDATA[首先配置软件环境：1、下载Android-2.1系统，并编译。$ . build/envsetup.sh          //配置选项，并编译android源码$ make cts                                 //android源码编译好后，在编译cts2、编译好cts后生成的文件位置如下#mydroid/out/host/linux-x86/在该目录下包含如下测试文件Package CTS: out/host/linux-x86/cts/android-cts.zip]]></description><category></category></item><item><title><![CDATA["Unable to get buffer of resource asset file"问题的解决]]></title><link>https://blog.csdn.net/mawl2002/article/details/5869169</link><guid>https://blog.csdn.net/mawl2002/article/details/5869169</guid><author>mawl2002</author><pubDate>Tue, 07 Sep 2010 18:27:00 +0800</pubDate><description><![CDATA[<br /><br />Problems <br />When building you might run into the Unable to get buffer of resource asset file error. The root cause of this is that the new android resource file resources.arsc is larger than the aapt tool allows. You can exchange the .arsc f]]></description><category></category></item><item><title><![CDATA[Android调试的必杀技——反汇编 ]]></title><link>https://blog.csdn.net/mawl2002/article/details/5850226</link><guid>https://blog.csdn.net/mawl2002/article/details/5850226</guid><author>mawl2002</author><pubDate>Mon, 30 Aug 2010 16:58:00 +0800</pubDate><description><![CDATA[<br /><br />在移植Android过程中会遇到很多Crash的事情。一般这些问题都可以通过看代码能解决，当然也有一些比较难搞的问题，非常难找到头绪，在 logcat日志也只会打印一些崩溃的堆栈，这些信息很难帮助我们定位问题。根据个人一个实例来介绍一下在Android移植过程中反汇编的用法。<br />     首先先看一下我遇到的一个logcat关于Crash的打印信息：I/DEBUG   ( 1417): *** *** *** *** *** *** *** *** *** *** *** *]]></description><category></category></item><item><title><![CDATA[Android中的Logcat方法查看内核的日志]]></title><link>https://blog.csdn.net/mawl2002/article/details/5832227</link><guid>https://blog.csdn.net/mawl2002/article/details/5832227</guid><author>mawl2002</author><pubDate>Mon, 23 Aug 2010 16:19:00 +0800</pubDate><description><![CDATA[<br />
步骤如下：
1.在Android的源码中（目标路径为：system/core/logcat/logcat.cpp），将其此logcat.cpp文件中的static void readLogLines(int logfd)函数作出如下修改：
<br />
static void readLogLines(int logfd)
{
<br />
char buffer[256] = {0}
;
<br />
while (1) {
<br />
unsigned char ]]></description><category></category></item><item><title><![CDATA[蓝牙调查相关工具使用]]></title><link>https://blog.csdn.net/mawl2002/article/details/5832225</link><guid>https://blog.csdn.net/mawl2002/article/details/5832225</guid><author>mawl2002</author><pubDate>Mon, 23 Aug 2010 16:19:00 +0800</pubDate><description><![CDATA[<br />
1.dbus-send<br />
｛｛｛
<br />
向指定dbus服务发送调用请求。
dbus-send [--system | --session] [--dest=NAME] [--print-reply] 
[--type=TYPE] <destination object path> <message name> 
以bluez为例，向hcid发送请求：
dbus-send --system  --print-reply  --dest=org.bluez  / ]]></description><category></category></item><item><title><![CDATA[一个小的面试题目]]></title><link>https://blog.csdn.net/mawl2002/article/details/5690890</link><guid>https://blog.csdn.net/mawl2002/article/details/5690890</guid><author>mawl2002</author><pubDate>Thu, 24 Jun 2010 10:23:00 +0800</pubDate><description><![CDATA[<br />Q：不使用任何中间变量和库函数，计算字符串的长度<br />A：那就使用递归和自操作<br /> <br />代码如下：<br />static int my_strlen(char *str)
{
    if(*str != '/0'){
        return (my_strlen(++str)+1);
    }else{
        return 0;
    }
}
]]></description><category></category></item><item><title><![CDATA[Build Android Kernel]]></title><link>https://blog.csdn.net/mawl2002/article/details/5516908</link><guid>https://blog.csdn.net/mawl2002/article/details/5516908</guid><author>mawl2002</author><pubDate>Thu, 22 Apr 2010 17:34:00 +0800</pubDate><description><![CDATA[1.准备编译环境sudo apt-get install build-essential ncurses-dev 2.Get kernel sourcegit clone git://android.git.kernel.org/kernel/common.gitgit checkout origin/android-goldfish-2.6.29 -b goldfish 3.Get ]]></description><category></category></item><item><title><![CDATA[Android AlertController的小bug?]]></title><link>https://blog.csdn.net/mawl2002/article/details/5448050</link><guid>https://blog.csdn.net/mawl2002/article/details/5448050</guid><author>mawl2002</author><pubDate>Sat, 03 Apr 2010 17:36:00 +0800</pubDate><description><![CDATA[上周五在帮一个实习生调试程序的时候发现了这个问题，他当时想实现一个这样的功能：当用户选择删除时，以dialog的方式弹出数据列表，并且每个数据都有一个checkbox，用户选择后可以进行删除过滤。具体的接口是： public AlertDialog.Builder setMultiChoiceItems (Cursor cursor, String                   ]]></description><category></category></item><item><title><![CDATA[解决Ubuntu上ADB找不到设备的问题]]></title><link>https://blog.csdn.net/mawl2002/article/details/5248579</link><guid>https://blog.csdn.net/mawl2002/article/details/5248579</guid><author>mawl2002</author><pubDate>Sat, 23 Jan 2010 15:11:00 +0800</pubDate><description><![CDATA[按照google官方的说法，如下步骤操作：If youre developing on Ubuntu Linux, you need to add a rules file: Login as root and create this file: /etc/udev/rules.d/50-android.rules.For Gusty/Hardy, edit the file t]]></description><category></category></item></channel></rss>