<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fan&#039;s blog &#187; Mobile</title>
	<atom:link href="http://fkpwolf.net/category/mobile/feed/" rel="self" type="application/rss+xml" />
	<link>http://fkpwolf.net</link>
	<description>无为而无不为</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>webOS程序的调试</title>
		<link>http://fkpwolf.net/2011/05/29/webos-debug/</link>
		<comments>http://fkpwolf.net/2011/05/29/webos-debug/#comments</comments>
		<pubDate>Sun, 29 May 2011 07:14:29 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http:///?p=980</guid>
		<description><![CDATA[对于web开发，Firebug之类的工具必不可少。webOS的SDK里面自带了Palm Inspector的调试程序，不过我反复尝试都没有调试成功，一直提示“Disconnected. If you get disconnected as soon as you start Palm Inspector, make sure that the app is ready for inspection.&#8221;。可是我已经通过命令&#8221;palm-launch -i com.mycompany.palm1&#8243;使app运行在inspector的模式了，奇怪的很。 Google一下，发现有种新的调试模式：Emulator Host Mode，可以直接用桌面Chrome来运行app，文档上说的是用PuTTY，我摸索了下，配置如下： 这样，ssh到localhost:5522，帐号：root/[enter]，然后在Chrome访问http://localhost:5580/。如下： 可以使用Chrome的Developer Tool来查看dom对象，Cool! 看来webOS系统本身有个web server运行在8080端口上，而UI则是用webkit访问这个server的结果，这个web服务是自给自足啊！不过一些本地功能，比如“打电话”，在Chrome中显然使用不了，所以这个工具只是用来调整UI用的。 新的框架Enyo好像独立出来了，可以直接在本地开发。]]></description>
			<content:encoded><![CDATA[<p>对于web开发，Firebug之类的工具必不可少。webOS的SDK里面自带了Palm Inspector的调试程序，不过我反复尝试都没有调试成功，一直提示“Disconnected. If you get disconnected as soon as you start Palm Inspector, make sure that the app is ready for inspection.&#8221;。可是我已经通过命令&#8221;palm-launch -i com.mycompany.palm1&#8243;使app运行在inspector的模式了，奇怪的很。</p>
<p>Google一下，发现有种新的调试模式：<a href="https://developer.palm.com/content/api/dev-guide/tools/emulator.html#using-emulator-host-mode">Emulator Host Mode</a>，可以直接用桌面Chrome来运行app，文档上说的是用PuTTY，我摸索了下，配置如下：</p>
<p><a href="http://fkpwolf.net/WordPress/wp-content/uploads/2011/05/palm2.png"><img class="alignnone size-full wp-image-981" title="palm2" src="http://fkpwolf.net/WordPress/wp-content/uploads/2011/05/palm2.png" alt="" width="615" height="546" /></a></p>
<p>这样，ssh到localhost:5522，帐号：root/[enter]，然后在Chrome访问http://localhost:5580/。如下：</p>
<p><a href="http://fkpwolf.net/WordPress/wp-content/uploads/2011/05/palm1.png"><img class="alignnone size-full wp-image-982" title="palm1" src="http://fkpwolf.net/WordPress/wp-content/uploads/2011/05/palm1.png" alt="" width="362" height="510" /></a></p>
<p>可以使用Chrome的Developer Tool来查看dom对象，Cool! 看来webOS系统本身有个web server运行在8080端口上，而UI则是用webkit访问这个server的结果，这个web服务是自给自足啊！不过一些本地功能，比如“打电话”，在Chrome中显然使用不了，所以这个工具只是用来调整UI用的。</p>
<p>新的框架Enyo好像独立出来了，可以直接在本地开发。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2011/05/29/webos-debug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android的“最近应用对话框”</title>
		<link>http://fkpwolf.net/2011/01/09/android-recent-application-dialog/</link>
		<comments>http://fkpwolf.net/2011/01/09/android-recent-application-dialog/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 11:08:55 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Graph]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http:///?p=877</guid>
		<description><![CDATA[这个对话框会列出应用的图标，当用小球把焦点移到某个图标时，这个图标会有种“光晕”的效果，如下图所示： 刚看到时想要如何画呢：确定图片的边界然后画上一条曲线？把放大后的图片和原来的图片叠加？模糊的边角看上去也很cool&#8230; 找一通后发现对话框的代码位置：$Droid_Src/frameworks/base/policy/src/com/android/internal/policy/impl/com/android/internal/policy/impl，图片处理的代码为IconUtilities.java。图简便就地使用ApiDemo里面的代码来做个小例子，主要代码如下。显示结果在上面的图片中。 int[] xy = new int[2]; Paint mBlurPaint = new Paint(); final float density = mDisplayMetrics.density; final float blurPx = 5 * density; mBlurPaint.setMaskFilter(new BlurMaskFilter(blurPx, BlurMaskFilter.Blur.NORMAL)); Bitmap mask = mBitmap.extractAlpha(mBlurPaint, xy); mGlowColorFocusedPaint = new Paint(); mGlowColorFocusedPaint.setColor(0xffff8e00); mGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30)); canvas.drawBitmap(mask, 10, y, mGlowColorFocusedPaint); canvas.drawBitmap(mBitmap, 10-xy[0], y-xy[1], new Paint()); 上面TableMaskFilter在android定义为hidden，所以不能在自己的项目中用。我找个一个方法：在自己的project中重新定义一个同名同package的脚手架类，使上面代码编译通过即可。这个方法跟iPhone上面一样。 package android.graphics; public class TableMaskFilter2 [...]]]></description>
			<content:encoded><![CDATA[<p>这个对话框会列出应用的图标，当用小球把焦点移到某个图标时，这个图标会有种“光晕”的效果，如下图所示：</p>
<p><a href="http://fkpwolf.net/WordPress/wp-content/uploads/2011/01/device111.png"><img class="alignnone size-full wp-image-878" title="device111" src="http://fkpwolf.net/WordPress/wp-content/uploads/2011/01/device111.png" alt="" width="320" height="480" /></a></p>
<p>刚看到时想要如何画呢：确定图片的边界然后画上一条曲线？把放大后的图片和原来的图片叠加？模糊的边角看上去也很cool&#8230;</p>
<p>找一通后发现对话框的代码位置：$Droid_Src/frameworks/base/policy/src/com/android/internal/policy/impl/com/android/internal/policy/impl，图片处理的代码为IconUtilities.java。图简便就地使用ApiDemo里面的代码来做个小例子，主要代码如下。显示结果在上面的图片中。</p>
<pre class="brush:java">int[] xy = new int[2];
Paint mBlurPaint = new Paint();
final float density = mDisplayMetrics.density;
final float blurPx = 5 * density;
mBlurPaint.setMaskFilter(new BlurMaskFilter(blurPx, BlurMaskFilter.Blur.NORMAL));
Bitmap mask = mBitmap.extractAlpha(mBlurPaint, xy);

mGlowColorFocusedPaint = new Paint();
mGlowColorFocusedPaint.setColor(0xffff8e00);
mGlowColorFocusedPaint.setMaskFilter(TableMaskFilter.CreateClipTable(0, 30));
canvas.drawBitmap(mask, 10, y, mGlowColorFocusedPaint);
canvas.drawBitmap(mBitmap, 10-xy[0], y-xy[1], new Paint());</pre>
<p>上面TableMaskFilter在android定义为hidden，所以不能在自己的项目中用。我找个一个方法：在自己的project中重新定义一个同名同package的脚手架类，使上面代码编译通过即可。这个方法跟iPhone上面一样。</p>
<pre class="brush:java">package android.graphics;

public class TableMaskFilter2 extends MaskFilter {

public TableMaskFilter2(byte[] table) {

}

public static TableMaskFilter2 CreateClipTable(int min, int max) {
return null;
}

public static TableMaskFilter2 CreateGammaTable(float gamma) {
return null;
}
}</pre>
<p>代码很简单，和Photoshop的一些滤镜有点像&#8230;&#8230; 但是后面的原理现在还不清楚。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2011/01/09/android-recent-application-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android 2.2终于开放了推送的消息服务</title>
		<link>http://fkpwolf.net/2010/05/22/android-2-22-push-message/</link>
		<comments>http://fkpwolf.net/2010/05/22/android-2-22-push-message/#comments</comments>
		<pubDate>Sat, 22 May 2010 02:13:30 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http:///?p=764</guid>
		<description><![CDATA[内流满面阿，终于不用自己搞个长连接了。 2.2释放出来了，在其新特性中，有一点：Cloud to Device Messag(C2DM)，这个跟gtalk类似，可以让web程序或者app engine向手机发送消息，不同的是gtalk是系统级别的，一般程序访问不了，这个则是标准的API。 在旧版本android上实现这个功能还是蛮麻烦的，我原来写过。主要的思路就是自己起一个gtalk的客户端，用xmpp协议，然后放在service保证长时间运行。缺点很明显：这个service消耗手机资源，功能跟系统本身服务重复。不过在消息服务没有开放时，自己的app是接收不到xmpp消息的。 google开放出来很直接，因为使用的还是老一套。下面是手机受到消息时的log，可以看出使用的还是smack，当然，协议还是xmpp了。 05-22 09:26:13.356: DEBUG/GTalkService(223): [ChatMgr] processPacket: not logged in! drop org.jivesoftware.smack.packet.DataMessage@43e929e8 05-22 09:26:13.576: INFO/JumpNote_SyncAdapter(298): Beginning full sync for account fkpwolf@gmail.com 05-22 09:26:16.316: INFO/JumpNote_SyncAdapter(298): Sync complete, setting last sync time to 1274491573563 那么web端或者云端如何发送消息呢？我看到代码里面是访问https://android.clients.google.com/c2dm/send，大概用的是rest吧。不过现在google要申请帐号才能访问这个服务。mobile收消息则使用标准的receiver模式。 Google给了个例子：JumpNote，可以看作双向同步功能的写字板。技术用android client + app engine + gwt（web client），使用了android新的sync API，还是一个蛮复杂的例子，因为这不单单是一个mobile app，而是一个完整的云服务实例，值得仔细研究研究。]]></description>
			<content:encoded><![CDATA[<p>内流满面阿，终于不用自己搞个长连接了。</p>
<p>2.2释放出来了，在其新特性中，有一点：Cloud to Device Messag(<a href="http://code.google.com/intl/zh-CN/android/c2dm/">C2DM</a>)，这个跟gtalk类似，可以让web程序或者app engine向手机发送消息，不同的是gtalk是系统级别的，一般程序访问不了，这个则是标准的API。</p>
<p>在旧版本android上实现这个功能还是蛮麻烦的，我原来<a href="http:///2009/11/15/android%E4%B8%8A%E7%9A%84push-notification%E5%92%8Cxmpp1/">写过</a>。主要的思路就是自己起一个gtalk的客户端，用xmpp协议，然后放在service保证长时间运行。缺点很明显：这个service消耗手机资源，功能跟系统本身服务重复。不过在消息服务没有开放时，自己的app是接收不到xmpp消息的。</p>
<p>google开放出来很直接，因为使用的还是老一套。下面是手机受到消息时的log，可以看出使用的还是smack，当然，协议还是xmpp了。</p>
<p>05-22 09:26:13.356: DEBUG/GTalkService(223): [ChatMgr] processPacket: not logged in! drop org.jivesoftware.smack.packet.DataMessage@43e929e8<br />
05-22 09:26:13.576: INFO/JumpNote_SyncAdapter(298): Beginning full sync for account fkpwolf@gmail.com<br />
05-22 09:26:16.316: INFO/JumpNote_SyncAdapter(298): Sync complete, setting last sync time to 1274491573563</p>
<p>那么web端或者云端如何发送消息呢？我看到代码里面是访问https://android.clients.google.com/c2dm/send，大概用的是rest吧。不过现在google要申请帐号才能访问这个服务。mobile收消息则使用标准的receiver模式。</p>
<p>Google给了个例子：<a href="http://code.google.com/p/jumpnote/" target="_blank">JumpNote</a>，可以看作双向同步功能的写字板。技术用android client + app engine + gwt（web client），使用了android新的sync API，还是一个蛮复杂的例子，因为这不单单是一个mobile app，而是一个完整的云服务实例，值得仔细研究研究。</p>
<p><img class="alignnone size-full wp-image-770" title="device" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/05/device.png" alt="device" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/05/22/android-2-22-push-message/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More about get rid of toolbar at iPhone Safari</title>
		<link>http://fkpwolf.net/2010/05/08/more-about-get-rid-of-toolbar-at-iphone-safari/</link>
		<comments>http://fkpwolf.net/2010/05/08/more-about-get-rid-of-toolbar-at-iphone-safari/#comments</comments>
		<pubDate>Sat, 08 May 2010 06:45:02 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http:///?p=744</guid>
		<description><![CDATA[When you visit some web site like Google Reader or Delicious at iPhone Safari, maybe you will notice that after have loaded page, the browser will hide tool bar automatically. This feature can save phone&#8217;s valuable screen space. To implement it we can just use javascript: window.scrollTo(0,1). See here, and here. &#60;script type="application/x-javascript"&#62; if (navigator.userAgent.indexOf('iPhone') [...]]]></description>
			<content:encoded><![CDATA[<p>When you visit some web site like Google Reader or Delicious at iPhone Safari, maybe you will notice that after have loaded page, the browser will hide tool bar automatically. This feature can save phone&#8217;s valuable screen space. To implement it we can just use javascript: <em>window.scrollTo(0,1)</em>. See <a href="http://ajaxian.com/archives/iphone-web-development-tips-and-official-documentation-released">here</a>, and <a href="http://www.iphonewebdev.com/examples/">here</a>.</p>
<pre class="brush:javascript">&lt;script type="application/x-javascript"&gt;

if (navigator.userAgent.indexOf('iPhone') != -1) {
 addEventListener("load", function() {
 setTimeout(hideURLbar, 0);
 }, false);
}

function hideURLbar() {
 window.scrollTo(0, 1);
}

&lt;/script&gt;</pre>
<p>In common sense, it works. But if it didn&#8217;t, this article will help you.</p>
<p>First if we want toolbar hidden, beside the above JavaScript, below two conditions should be true:</p>
<p>1) <strong>web page is long enough</strong>. If it is short, the browser will think it is not necessary to hide the bar. You can zoom the page to test this rule.</p>
<p>2) <strong><em>scrollTo after page updated. </em></strong><em>setTimeout</em> is used for this. We often invoke an AJAX to get HTML text from server and then update some part of page. The updating action will reload page so <em>window.scrollTo</em> must be invoked <strong>after</strong> AJAX has gotten response and page has been updated. So the timeout of scrollTo should be bigger than timeout of Ajax. Or invoke scrollTo after had gotten response directly. Keep in mind that setTimeout and Ajax both are <strong>asynchronous</strong>.  <span style="text-decoration: line-through;">I used jQuery and <em>$(#id).html(&#8220;&lt;div&gt;&#8230;&#8221;);</em> to update page, so for DRY, </span><span style="text-decoration: line-through;">I override this function</span>:</p>
<pre class="brush:javascript">if (navigator.userAgent.indexOf('iPhone') != -1) {
 (function ($) {
 var originalVal = $.fn.html;
 var hideURLbar = function() {window.scrollTo(0,1);};
 $.fn.html = function(value) {
var ret = originalVal.call(this, value);
 if (typeof value != 'undefined') {
 // setter invoked, do processing
 setTimeout(hideURLbar, 100);
 }
 return ret;
 };
 })(jQuery);
};</pre>
<p>I found this cool script from <a href="http://stackoverflow.com/questions/2059907/override-jquery-val-function">here</a>. Mabye this approach impacts app much, for html method is used everywhere in app. So take care before apply it. There is another option: use<em> $(document).trigger</em> to sent event.<br />
<img class="alignnone size-full wp-image-745" title="Screenshot 2010.05.08 14.39.26" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/05/Screenshot-2010.05.08-14.39.26.png" alt="Screenshot 2010.05.08 14.39.26" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/05/08/more-about-get-rid-of-toolbar-at-iphone-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>第一个iphone小程序，哈哈</title>
		<link>http://fkpwolf.net/2010/05/02/my-first-iphone-app/</link>
		<comments>http://fkpwolf.net/2010/05/02/my-first-iphone-app/#comments</comments>
		<pubDate>Sun, 02 May 2010 07:42:43 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http:///?p=736</guid>
		<description><![CDATA[瞎鼓捣出来的程序：豆瓣的客户端。不过这次是iphone的本地程序，还是个雏形。由于server端调用采用的都是json数据格式，所以换个client很容易，真正的MVC模式啊。不过iphone本身好像不带json支持，还得自己下载个，看来还是android扩展好点。 iphone开发感觉还是很怪异的，objective c还要自己管理内存，alloc &#38; release，啥啊。UI用这，server端用ruby，很不和谐啊，反过来还差不多。而且这种语言还不是标准c，加了很多扩展，N多关键字。不过人家UI牛就是没办法，动画效果无处不在（osX积累多年噢），这样才让本地应用比较html有了存在的理由。]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-737" title="Screenshot 2010.05.02 14.48.52" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/05/Screenshot-2010.05.02-14.48.52-200x300.png" alt="Screenshot 2010.05.02 14.48.52" width="200" height="300" /></p>
<p>瞎鼓捣出来的程序：豆瓣的客户端。不过这次是iphone的本地程序，还是个雏形。由于server端调用采用的都是json数据格式，所以换个client很容易，真正的MVC模式啊。不过iphone本身好像不带json支持，还得自己<a href="http://www.mobileorchard.com/tutorial-json-over-http-on-the-iphone/">下载</a>个，看来还是android扩展好点。</p>
<p>iphone开发感觉还是很怪异的，objective c还要自己管理内存，alloc &amp; release，啥啊。UI用这，server端用ruby，很不和谐啊，反过来还差不多。而且这种语言还不是标准c，加了很多扩展，N多关键字。不过人家UI牛就是没办法，动画效果无处不在（osX积累多年噢），<strong>这样才让本地应用比较html有了存在的理由</strong>。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/05/02/my-first-iphone-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>终于成为iphone开发者了</title>
		<link>http://fkpwolf.net/2010/04/26/%e7%bb%88%e4%ba%8e%e6%88%90%e4%b8%baiphone%e5%bc%80%e5%8f%91%e8%80%85%e4%ba%86/</link>
		<comments>http://fkpwolf.net/2010/04/26/%e7%bb%88%e4%ba%8e%e6%88%90%e4%b8%baiphone%e5%bc%80%e5%8f%91%e8%80%85%e4%ba%86/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 13:44:46 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http:///?p=732</guid>
		<description><![CDATA[android上面苦熬和观望一年后，上个月申请开发者，25$，但是没想到被据了，很是不爽，一气之下投奔iphone（虽然我对object c一窍不通）。 花了99$。注册过程很简单，麻烦的地方就是要传真下，网上有的攻略说要3个星期才能申请下来，N多TIPS云云。其实很简单。2天OK。无语。 资讯发达后，特别是类似“百度知道”这种问答类的网站的出现，确实提供了很多便利。但是也让人屁大的事情都要到网上google一下，结果人云亦云，没有主见，买个硬盘前做很多功课，货比三家，还特别迷信某些blog的评测数据。无聊之级！ 说远了。付了99$后就可以下载iphone os 4 beta了，终于看到了传说中的mutil-task（双击home按钮，android上是长按），当然，是在模拟器上的。 五一去买个ipod touch 32g，这东西要切身体会下才会有灵感，对吧，又得花钱了，唉。]]></description>
			<content:encoded><![CDATA[<p>android上面苦熬和观望一年后，上个月申请开发者，25$，但是没想到<a href="http://www.javaeye.com/topic/647440">被据</a>了，很是不爽，一气之下投奔iphone（虽然我对object c一窍不通）。</p>
<p>花了99$。注册过程很简单，麻烦的地方就是要传真下，网上有的攻略说要3个星期才能申请下来，N多TIPS云云。其实很简单。2天OK。无语。</p>
<p>资讯发达后，特别是类似“百度知道”这种问答类的网站的出现，确实提供了很多便利。但是也让人屁大的事情都要到网上google一下，结果人云亦云，<strong>没有主见</strong>，买个硬盘前做很多功课，货比三家，还特别迷信某些blog的评测数据。无聊之级！</p>
<p>说远了。付了99$后就可以下载iphone os 4 beta了，终于看到了传说中的mutil-task（双击home按钮，android上是长按），当然，是在模拟器上的。</p>
<p>五一去买个ipod touch 32g，这东西要切身体会下才会有灵感，对吧，又得花钱了，唉。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/04/26/%e7%bb%88%e4%ba%8e%e6%88%90%e4%b8%baiphone%e5%bc%80%e5%8f%91%e8%80%85%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7惊艳</title>
		<link>http://fkpwolf.net/2010/02/23/windows-phone-7%e6%83%8a%e8%89%b3/</link>
		<comments>http://fkpwolf.net/2010/02/23/windows-phone-7%e6%83%8a%e8%89%b3/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 12:50:29 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http:///?p=640</guid>
		<description><![CDATA[iFanr上面的这篇文章总结的很好： WP7 的 UI 和 ZuneHD 很像，相当现代——巨大的文字、超出边界的元素都在刻意强调屏幕只显示出一部分内容。 确实，跟iPhone强调图标的方式不同，Phone 7用巨大的文字来组成界面，这使界面更简洁和素雅，如同CK的logo一样，这种方式相当的大胆。 而分裂的界面元素如同残缺的印章一样，不仅有艺术性，更有暗示：界面是滑动的和部分的。 这个界面其实跟Plam pre很类似： 只可惜Plam Pre死在了沙滩上。]]></description>
			<content:encoded><![CDATA[<p>iFanr上面的<a href="http://www.ifanr.com/6983">这篇</a>文章总结的很好：</p>
<blockquote><p>WP7 的 UI 和 ZuneHD 很像，相当现代——巨大的文字、超出边界的元素都在刻意强调屏幕只显示出一部分内容。</p></blockquote>
<p>确实，跟iPhone强调图标的方式不同，Phone 7用巨大的文字来组成界面，这使界面更简洁和素雅，如同CK的logo一样，这种方式相当的大胆。</p>
<p>而分裂的界面元素如同残缺的印章一样，不仅有艺术性，更有暗示：界面是滑动的和部分的。</p>
<p><img class="alignnone" title="硕士" src="http://www.ifanr.com/wp-content/uploads/2010/02/WP73_thumb.jpg" alt="" width="500" height="232" /></p>
<p>这个界面其实跟Plam pre很类似：</p>
<p><img class="alignnone" title="ss" src="http://www.palm.com/us/assets/images/products/software/multiple-applications.png" alt="" width="215" height="248" /></p>
<p>只可惜Plam Pre死在了沙滩上。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/02/23/windows-phone-7%e6%83%8a%e8%89%b3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>豆瓣手机客户端：“煮豆” 第二个版本</title>
		<link>http://fkpwolf.net/2010/02/08/douban-client-second-edition/</link>
		<comments>http://fkpwolf.net/2010/02/08/douban-client-second-edition/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 14:04:09 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[doubanclient]]></category>

		<guid isPermaLink="false">http:///?p=630</guid>
		<description><![CDATA[主要是作了些页面上的调整，模仿m.flickr.com加上了标签，所以页面风格是google reader + flickr mobile，融合的还有点生硬，这种照抄过来的，坦白的说，我看的都有点恶心。另外添加了“搜索”这个比较常用的功能。其他倒没啥，欢迎批评指正。 总算在春节回家前改好了，因为明天晚上回武汉的火车，所以改的比较匆忙。回家结婚去了，哈哈，也预祝各位春节快乐！]]></description>
			<content:encoded><![CDATA[<p>主要是作了些页面上的调整，模仿m.flickr.com加上了标签，所以页面风格是google reader + flickr mobile，融合的还有点生硬，这种照抄过来的，坦白的说，我看的都有点恶心。另外添加了“搜索”这个比较常用的功能。其他倒没啥，欢迎批评指正。</p>
<p>总算在春节回家前改好了，因为明天晚上回武汉的火车，所以改的比较匆忙。回家结婚去了，哈哈，也预祝各位春节快乐！</p>
<p><img class="alignnone size-full wp-image-631" style="border: 1px solid black;" title="device" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/02/device.png" alt="device" width="320" height="480" /></p>
<p><img class="alignnone size-full wp-image-632" style="border: 1px solid black;" title="device2" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/02/device2.png" alt="device2" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/02/08/douban-client-second-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress&#20986;&#33258;&#23478;&#30340;android&#23458;&#25143;&#31471;&#21862;</title>
		<link>http://fkpwolf.net/2010/02/03/wordpressandroid/</link>
		<comments>http://fkpwolf.net/2010/02/03/wordpressandroid/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 03:14:06 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[软件评测]]></category>

		<guid isPermaLink="false">http:///2010/02/03/wordpressandroid/</guid>
		<description><![CDATA[感觉和原来的那个wpToGo功能差不多，毕竟都是基于标准的xml-rpc么，只不过图标漂亮点(我喜欢衬体W的logo)，界面细腻点，就这样完胜wpToGo。细节啊，是个魔鬼。 这个东西和twitter冲突比较多：在手机上发篇短的博客还不如去推一把，再不行就用国产的围脖吧&#8230; 1）界面把“评论“放在首位，还有评论通知的功能，深知“社会软件“的精髓啊； 2）有本地草稿的功能，这个在手机网络上就很有必要，否则这个客户端比较标准web页面就是没一处优点了； 3）开源。automattic知道自己的利润来源点，视代码如粪土，佩服。]]></description>
			<content:encoded><![CDATA[<p>感觉和原来的那个wpToGo功能差不多，毕竟都是基于标准的xml-rpc么，只不过图标漂亮点(我喜欢衬体W的logo)，界面细腻点，就这样完胜wpToGo。细节啊，是个魔鬼。</p>
<p>这个东西和twitter冲突比较多：在手机上发篇短的博客还不如去推一把，再不行就用国产的围脖吧&#8230;</p>
<p>1）界面把“评论“放在首位，还有评论通知的功能，深知“社会软件“的精髓啊；</p>
<p>2）有本地草稿的功能，这个在手机网络上就很有必要，否则这个客户端比较标准web页面就是没一处优点了；</p>
<p>3）开源。automattic知道自己的利润来源点，视代码如粪土，佩服。</p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/02/03/wordpressandroid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改Android的自带程序：“屏幕锁” － 加上联通标志</title>
		<link>http://fkpwolf.net/2010/01/24/%e4%bf%ae%e6%94%b9android%e7%9a%84%e8%87%aa%e5%b8%a6%e7%a8%8b%e5%ba%8f%ef%bc%9a%e2%80%9c%e5%b1%8f%e5%b9%95%e9%94%81%e2%80%9d-%ef%bc%8d-%e5%8a%a0%e4%b8%8a%e8%81%94%e9%80%9a%e6%a0%87%e5%bf%97/</link>
		<comments>http://fkpwolf.net/2010/01/24/%e4%bf%ae%e6%94%b9android%e7%9a%84%e8%87%aa%e5%b8%a6%e7%a8%8b%e5%ba%8f%ef%bc%9a%e2%80%9c%e5%b1%8f%e5%b9%95%e9%94%81%e2%80%9d-%ef%bc%8d-%e5%8a%a0%e4%b8%8a%e8%81%94%e9%80%9a%e6%a0%87%e5%bf%97/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 02:56:34 +0000</pubDate>
		<dc:creator>Fan Fan</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http:///?p=590</guid>
		<description><![CDATA[我的机器是G1 + 联通WCDMA + Android 1.6 (Donut)。在原来用移动卡的时候，屏幕锁上有运营商(carrier)的标志，换成联通的卡后没有这个标志（可能是sim卡里面信息不全的缘故），光光的很是煞风景。这里说说下我修改的漫长过程。 0.check out 代码 这里要checkout出donut的代码，目前google源上已经有比这个更新的版本2.1，所以不能直接拿来用，否则我想机器启动会有问题，毕竟屏幕锁是系统第一个界面。 repo init -u git://android.git.kernel.org/platform/manifest.git -b donut 如果原来用的是master也没关系，repo sync时不会重新checkout所有的代码，所以会很快。然后进入项目framework/policy/base，运行命令git describe可以查看当前版本，git tag察看所有tag，可以用git checkout donut会只签出当前project的代码（很奇怪，donut这个HEAD不在git tag里面，git水很深啊） 1.修改Java代码。 研究了源代码后，我发现如果用修改配置或者扩展类的方法是改不了这个标志的，因为很多类在初始化时就定义了hard coding了type，扩展已有类是行不通的。于是就直接修改界面代码吧，这样也简单明了。定位framework/policy/base/phone下面的LockScreen.java， private void refreshSimOkHeaders(CharSequence plmn, CharSequence spn) { final IccCard.State simState = mUpdateMonitor.getSimState(); if (simState == IccCard.State.READY) { if (plmn != null &#38;&#38; !TextUtils.isEmpty(plmn)) { mHeaderSimOk1.setVisibility(View.VISIBLE); mHeaderSimOk1.setText(plmn); } else [...]]]></description>
			<content:encoded><![CDATA[<p>我的机器是G1 + 联通WCDMA + Android 1.6 (Donut)。在原来用移动卡的时候，屏幕锁上有运营商(carrier)的标志，换成联通的卡后没有这个标志（可能是sim卡里面信息不全的缘故），光光的很是煞风景。这里说说下我修改的漫长过程。</p>
<h4>0.check out 代码</h4>
<p>这里要checkout出donut的代码，目前google源上已经有比这个更新的版本2.1，所以不能直接拿来用，否则我想机器启动会有问题，毕竟屏幕锁是系统第一个界面。</p>
<p><span style="word-spacing: 0px; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate;"><span style="font-family: Courier New;">repo init</span><span style="font-family: courier new,monospace;"> -u git://android.git.kernel.org/platform/manifest.git <strong>-b donut</strong><br />
</span></span></p>
<p>如果原来用的是master也没关系，repo sync时不会重新checkout所有的代码，所以会很快。然后进入项目framework/policy/base，运行命令git describe可以查看当前版本，git tag察看所有tag，可以用git checkout donut会只签出当前project的代码（很奇怪，donut这个HEAD不在git tag里面，git水很深啊）</p>
<h4>1.修改Java代码。</h4>
<p>研究了源代码后，我发现如果用修改配置或者扩展类的方法是改不了这个标志的，因为很多类在初始化时就定义了hard coding了type，扩展已有类是行不通的。于是就直接修改界面代码吧，这样也简单明了。定位framework/policy/base/phone下面的LockScreen.java，</p>
<pre class="brush:ruby">    private void refreshSimOkHeaders(CharSequence plmn, CharSequence spn) {
        final IccCard.State simState = mUpdateMonitor.getSimState();
        if (simState == IccCard.State.READY) {
            if (plmn != null &amp;&amp; !TextUtils.isEmpty(plmn)) {
                mHeaderSimOk1.setVisibility(View.VISIBLE);
                mHeaderSimOk1.setText(plmn);
            } else {
                mHeaderSimOk1.setVisibility(View.GONE);
            }

            if (spn != null &amp;&amp; !TextUtils.isEmpty(spn)) {
                mHeaderSimOk2.setVisibility(View.VISIBLE);
                mHeaderSimOk2.setText(spn);
            } else {
                //mHeaderSimOk2.setVisibility(View.GONE);
                mHeaderSimOk2.setVisibility(View.VISIBLE);
                mHeaderSimOk2.setText("China Unicom");
            }</pre>
<p>最后3行是我修改的，hard coding就没啥好说的了。关于plmn和spn的区别，看<a href="http://www.52rd.com/bbs/Archive_Thread.asp?SID=22526&amp;TID=1" target="_blank">这里</a>。</p>
<h4>2. 编译</h4>
<p>make android.policy</p>
<p>这里只编译这个项目，会得到一个android.policy.jar。</p>
<p>遇到‘convert_endian’ undeclared (first use in this function)的错误看<a href="http://d.hatena.ne.jp/bs-android/20090914/1252930710" target="_blank">这里</a>，error: cast from ‘char*’ to ‘int’ loses precision的错误看<a href="http://www.mirwing.com/entry/Android-Source-Build-Error">这里</a>。个人感觉新版本代码编译错误更少。</p>
<p>另：我倒是想过直接修改android.policy.jar里面的classes.dex，比如先反编译，修改后直接再编译回去。不过网上找了几个工具，效果都不是很好。不清楚是dex反编译现在不成熟还是Google对dex保护太好。</p>
<h4>3.模拟机上测试</h4>
<p>为了保险起见（我可就这个手机），现在emulator上运行看看。本来想直接修改sdk带的system.img省事，后来发现用mkyaffs2image生成image不能用：模拟器起不来。算了，后来我是老老实实用make snod重新生成system.img。</p>
<h4>4.上传到真机</h4>
<p>这又是一个很烦琐的过程：mount /system让它可写（步骤见<a href="http://karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/">这里</a>），adb push(先adb pull 备份，保险&#8230;)，然后，如果你跟我一样遇到Failed to copy: Permission denied.和Cross-device link的问题，一定要参考这个<a href="http://www.droidforums.net/forum/droid-hacks/14349-adb-push-permission-denied.html">贴子</a>，不要自己折腾了。最后chmod 644 android.policy.jar，恢复文件原来的属性。</p>
<h4>5.重启</h4>
<p>没啥问题，看来我是太小心了。看到结果后感觉也很一般，这个过程太折腾了，可能会又更好的办法吧，我是对git和make一点不熟，出了问题只能google。还好有点收获&#8230;休息去了，我的周末&#8230;</p>
<p><img class="alignnone size-full wp-image-596" title="device" src="http://fkpwolf.net/WordPress/wp-content/uploads/2010/01/device.png" alt="device" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://fkpwolf.net/2010/01/24/%e4%bf%ae%e6%94%b9android%e7%9a%84%e8%87%aa%e5%b8%a6%e7%a8%8b%e5%ba%8f%ef%bc%9a%e2%80%9c%e5%b1%8f%e5%b9%95%e9%94%81%e2%80%9d-%ef%bc%8d-%e5%8a%a0%e4%b8%8a%e8%81%94%e9%80%9a%e6%a0%87%e5%bf%97/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

