<?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>阳春面的学习摘录 &#187; Android</title>
	<atom:link href="http://chenyc.info/category/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://chenyc.info</link>
	<description>人生是一个不断折腾的过程，生命不息，折腾不止</description>
	<lastBuildDate>Thu, 15 Mar 2012 11:25:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>（转载）Android UI 优化-使用theme 预加载</title>
		<link>http://chenyc.info/2012/02/android-ui-theme-preload/</link>
		<comments>http://chenyc.info/2012/02/android-ui-theme-preload/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 05:41:59 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[黑屏]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=936</guid>
		<description><![CDATA[在很多时候，我们需要给一个Layout设置一个背景。例如，我们下下面的layout中使用了这样一个背景:

<pre></pre>

&#60;?xml version=”1.0″ encoding=”utf-8″?&#62;
&#60;LinearLayout xmlns:android=”http://sch[......]<p class='read-more'><a href='http://chenyc.info/2012/02/android-ui-theme-preload/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>在很多时候，我们需要给一个Layout设置一个背景。例如，我们下下面的layout中使用了这样一个背景:</p>
<pre>&lt;?xml version=”1.0″ encoding=”utf-8″?&gt;
&lt;LinearLayout xmlns:android=”http://schemas.a[......]</pre>
<p class='read-more'><a href='http://chenyc.info/2012/02/android-ui-theme-preload/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2012/02/android-ui-theme-preload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android方位指向功能的实现</title>
		<link>http://chenyc.info/2012/02/android-azimuth/</link>
		<comments>http://chenyc.info/2012/02/android-azimuth/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 09:05:45 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[定位]]></category>
		<category><![CDATA[指北针]]></category>
		<category><![CDATA[方位角]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=907</guid>
		<description><![CDATA[实现功能：
根据当前位置和目的位置的经纬度，将方向指针指向目的地。

如图:

<a href="/blog/wp-content/uploads/2012/02/device-2012-02-15-160628.png"><img class="alignnone  wp-image-308" title="device-2012-02-15-160628" src="/blog/wp-content/uploads/2012/02/device-2012-02-15-160628.png" alt="" width="288" height="512" data-pinit="registered" /></a>

使用到的技术点主要有指北针，定位，方位角计算。

<strong>1.指北针</strong>

Android方向感应器取的数组中第0项即为方向（值得范围是 0 ~ 359 其中0=North, 90=East, 180=So[......]<p class='read-more'><a href='http://chenyc.info/2012/02/android-azimuth/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>实现功能：<br />
根据当前位置和目的位置的经纬度，将方向指针指向目的地。</p>
<p>如图:</p>
<p><a href="/blog/wp-content/uploads/2012/02/device-2012-02-15-160628.png"><img class="alignnone  wp-image-308" title="device-2012-02-15-160628" src="/blog/wp-content/uploads/2012/02/device-2012-02-15-160628.png" alt="" width="288" height="512" data-pinit="registered" /></a></p>
<p>使用到的技术点主要有指北针，定位，方位角计算。</p>
<p><strong>1.指北针</strong></p>
<p>Android方向感应器取的数组中第0项即为方向（值得范围是 0 ~ 359 其中0=North, 90=East, 180=So[......]
<p class='read-more'><a href='http://chenyc.info/2012/02/android-azimuth/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2012/02/android-azimuth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android NDK介绍及JNI调用</title>
		<link>http://chenyc.info/2012/01/android-ndk-and-jni/</link>
		<comments>http://chenyc.info/2012/01/android-ndk-and-jni/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 03:36:32 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[jni]]></category>
		<category><![CDATA[ndk]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=798</guid>
		<description><![CDATA[Android NDK是用来编译能在手机ARM平台上运行的，通过C/C++编写的LIB库。

注：理论上不只在ARM平台，以后应该也能在Intel x86平台上运行的。

JNI调用，是为了使java能够调用C/C++所编写的程序的一种机制。

Android NDK和JNI调用结合，就[......]<p class='read-more'><a href='http://chenyc.info/2012/01/android-ndk-and-jni/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>Android NDK是用来编译能在手机ARM平台上运行的，通过C/C++编写的LIB库。</p>
<p>注：理论上不只在ARM平台，以后应该也能在Intel x86平台上运行的。</p>
<p>JNI调用，是为了使java能够调用C/C++所编写的程序的一种机制。</p>
<p>Android NDK和JNI调用结合，就[......]
<p class='read-more'><a href='http://chenyc.info/2012/01/android-ndk-and-jni/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2012/01/android-ndk-and-jni/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android EditText强制输入数字</title>
		<link>http://chenyc.info/2011/12/android-edittext_only_digits/</link>
		<comments>http://chenyc.info/2011/12/android-edittext_only_digits/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 09:16:15 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=782</guid>
		<description><![CDATA[需要控制同时软输入法和实体输入法

<pre></pre>


//控制输入法只能用数字输入法
inputEdit.setInputType(InputType.TYPE_CLASS_PHONE);

//设置文本框只接收数字输入，禁止实体键盘输入其他字符
DigitsKeyListener lis[......]<p class='read-more'><a href='http://chenyc.info/2011/12/android-edittext_only_digits/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>需要控制同时软输入法和实体输入法</p>
<pre>
//控制输入法只能用数字输入法
inputEdit.setInputType(InputType.TYPE_CLASS_PHONE);

//设置文本框只接收数字输入，禁止实体键盘输入其他字符
DigitsKeyListener listener[......]</pre>
<p class='read-more'><a href='http://chenyc.info/2011/12/android-edittext_only_digits/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/12/android-edittext_only_digits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android EditText 增加自定义过滤</title>
		<link>http://chenyc.info/2011/12/android-edittext-plus/</link>
		<comments>http://chenyc.info/2011/12/android-edittext-plus/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 09:07:46 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=773</guid>
		<description><![CDATA[在Android中，可以通过对EditText设置setFilters方法，用代码控制EditText的输入长度，或控制输入小数的位数等。
<p style="padding-left: 30px;"><strong>1.设置EditText的输入长度</strong></p>

<pre></pre>


inputEdit.setFilters(new InputFilter[] { new Input[......]<p class='read-more'><a href='http://chenyc.info/2011/12/android-edittext-plus/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>在Android中，可以通过对EditText设置setFilters方法，用代码控制EditText的输入长度，或控制输入小数的位数等。</p>
<p style="padding-left: 30px;"><strong>1.设置EditText的输入长度</strong></p>
<pre>
inputEdit.setFilters(new InputFilter[] { new InputFilter[......]</pre>
<p class='read-more'><a href='http://chenyc.info/2011/12/android-edittext-plus/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/12/android-edittext-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android LinearLayout根据状态切换图片(模拟按钮的效果）</title>
		<link>http://chenyc.info/2011/12/android_linearlayout_as_button/</link>
		<comments>http://chenyc.info/2011/12/android_linearlayout_as_button/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 14:58:23 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[LinearLayout]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=731</guid>
		<description><![CDATA[<p>在Android中Button可以根据选中，点击等状态切换图片，我想用LinearLayout实现类似的功能，</p>  <p>但是默认情况下pressed状态“容器类”（继承于ViewGroup的类）是接收不到的，</p>  <p>所以LinearLayout的按下就没有效果，后来分析代码，可以通过设置<span style="color: #0000ff">setAddState[......]</span></p><p class='read-more'><a href='http://chenyc.info/2011/12/android_linearlayout_as_button/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>在Android中Button可以根据选中，点击等状态切换图片，我想用LinearLayout实现类似的功能，</p>
<p>但是默认情况下pressed状态“容器类”（继承于ViewGroup的类）是接收不到的，</p>
<p>所以LinearLayout的按下就没有效果，后来分析代码，可以通过设置<span style="color: #0000ff">setAddState[......]</span></p>
<p class='read-more'><a href='http://chenyc.info/2011/12/android_linearlayout_as_button/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/12/android_linearlayout_as_button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android layout布局相关的注意点</title>
		<link>http://chenyc.info/2011/12/android-layout%e5%b8%83%e5%b1%80%e7%9b%b8%e5%85%b3%e7%9a%84%e6%b3%a8%e6%84%8f%e7%82%b9/</link>
		<comments>http://chenyc.info/2011/12/android-layout%e5%b8%83%e5%b1%80%e7%9b%b8%e5%85%b3%e7%9a%84%e6%b3%a8%e6%84%8f%e7%82%b9/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 14:19:20 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[性能]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=726</guid>
		<description><![CDATA[1.不要过多的嵌套布局，特别是在ListView中需要重复获取的情况下。嵌套布局的情况可以采用<code><a href="http://developer.android.com/reference/android/widget/RelativeLayout.html">RelativeLayout</a>替代<a href="http://developer.android.com/reference/android/widget/LinearLayout.html">LinearLayout</a>,减少嵌套层数。</code>

2.可以采用SDK工具里的<code>hierarchyviewer，分析layout的执行效率。</code>

<img src="http://developer.android.com/images/training/hierarchy-linearlayout.png" alt="" />

<img src="http://developer.android.com/images/training/hierarchy-layouttimes.png" alt="" />

3.利用新版的A[......]<p class='read-more'><a href='http://chenyc.info/2011/12/android-layout%e5%b8%83%e5%b1%80%e7%9b%b8%e5%85%b3%e7%9a%84%e6%b3%a8%e6%84%8f%e7%82%b9/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>1.不要过多的嵌套布局，特别是在ListView中需要重复获取的情况下。嵌套布局的情况可以采用<code><a href="http://developer.android.com/reference/android/widget/RelativeLayout.html">RelativeLayout</a>替代<a href="http://developer.android.com/reference/android/widget/LinearLayout.html">LinearLayout</a>,减少嵌套层数。</code></p>
<p>2.可以采用SDK工具里的<code>hierarchyviewer，分析layout的执行效率。</code></p>
<p><img src="http://developer.android.com/images/training/hierarchy-linearlayout.png" alt="" /></p>
<p><img src="http://developer.android.com/images/training/hierarchy-layouttimes.png" alt="" /></p>
<p>3.利用新版的A[......]
<p class='read-more'><a href='http://chenyc.info/2011/12/android-layout%e5%b8%83%e5%b1%80%e7%9b%b8%e5%85%b3%e7%9a%84%e6%b3%a8%e6%84%8f%e7%82%b9/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/12/android-layout%e5%b8%83%e5%b1%80%e7%9b%b8%e5%85%b3%e7%9a%84%e6%b3%a8%e6%84%8f%e7%82%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MatrixCursor(转载）</title>
		<link>http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/</link>
		<comments>http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 06:28:08 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/</guid>
		<description><![CDATA[ContentProvider对外共享数据的时候的query()方法是需要一个cursor的。
但是当ContentProvider不是从数据库中去的数据，而又需要返回cursor的时候就需要MatrixCursor。

ContentProvider对外共享数据的时候的query()方法是需[......]<p class='read-more'><a href='http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>ContentProvider对外共享数据的时候的query()方法是需要一个cursor的。<br />
但是当ContentProvider不是从数据库中去的数据，而又需要返回cursor的时候就需要MatrixCursor。</p>
<p>ContentProvider对外共享数据的时候的query()方法是需[......]
<p class='read-more'><a href='http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/11/matrixcursor%e8%bd%ac%e8%bd%bd%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>不让ScrollView自动切换子View的焦点</title>
		<link>http://chenyc.info/2011/11/scrollview-dont-change-childview-foucs/</link>
		<comments>http://chenyc.info/2011/11/scrollview-dont-change-childview-foucs/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 04:31:00 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[ScrollView]]></category>

		<guid isPermaLink="false">http://chenyc.info/2011/11/%e4%b8%8d%e8%ae%a9scrollview%e8%87%aa%e5%8a%a8%e5%88%87%e6%8d%a2%e5%ad%90view%e7%9a%84%e7%84%a6%e7%82%b9-2/</guid>
		<description><![CDATA[在开发中，在同一个Activity中有多个输入框，不想让ScrollView自动切换EditText的焦点，
需要继承ScrollView,重写onRequestFocusInDescendants方法,然后在layout中使用自定义的ScrollView即可。

<pre></pre>


public[......]<p class='read-more'><a href='http://chenyc.info/2011/11/scrollview-dont-change-childview-foucs/'>阅读全文</a></p>]]></description>
			<content:encoded><![CDATA[<p>在开发中，在同一个Activity中有多个输入框，不想让ScrollView自动切换EditText的焦点，<br />
需要继承ScrollView,重写onRequestFocusInDescendants方法,然后在layout中使用自定义的ScrollView即可。</p>
<pre>
public class[......]</pre>
<p class='read-more'><a href='http://chenyc.info/2011/11/scrollview-dont-change-childview-foucs/'>阅读全文</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/11/scrollview-dont-change-childview-foucs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我的豆瓣V1.0发布</title>
		<link>http://chenyc.info/2011/03/mydouban-v1-0/</link>
		<comments>http://chenyc.info/2011/03/mydouban-v1-0/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 16:19:00 +0000</pubDate>
		<dc:creator>阳春面</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[dobuan]]></category>

		<guid isPermaLink="false">http://chenyc.info/?p=214</guid>
		<description><![CDATA[最近由于一些其他事情，没有空写“我的豆瓣”，

暂时移除掉我关注的人等功能，发布第一版先

详细请参考如下地址：

<a href="http://chenyc.info/mydouban/">http://chenyc.info/mydouban/</a>]]></description>
			<content:encoded><![CDATA[<p>最近由于一些其他事情，没有空写“我的豆瓣”，</p>
<p>暂时移除掉我关注的人等功能，发布第一版先</p>
<p>详细请参考如下地址：</p>
<p><a href="http://chenyc.info/mydouban/">http://chenyc.info/mydouban/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chenyc.info/2011/03/mydouban-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

