<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3958957048135874092</id><updated>2024-09-11T02:12:23.193-07:00</updated><category term="Android"/><title type='text'>雲曦Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-7754661102310356655</id><published>2013-08-06T22:21:00.002-07:00</published><updated>2013-08-06T22:22:57.522-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) AndroidManifest.xml 相關應用權限</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;1. 說明&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;撥打電話權限：&amp;lt;uses-permission android:name=&quot;android.permission.CALL_PHONE&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式新增模擬位置(DDMS提供模擬GPS位址給模擬器測試用)：android.permission.ACCESS_MOCK_LOCATION&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式存取CellID或WiFi熱點來取得粗略的位置：android.permission.ACCESS_COARSE_LOCATION&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;存取閃光燈：android.permission.FLASHLIGHT&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式使用網路權限android.permission.INTERNET&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式讀取簡訊訊息android.permission.READ_SMS&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;請求能夠重新啟動設備：android.permission.REBOOT&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許一個程式初始化一個電話撥號不需透過撥號使用者界面需要使用者確認：android.permission.CALL_PHONE&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式錄製音訊：android.permission.RECORD_AUDIO&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式發送簡訊：android.permission.SEND_SMS&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式讀取使用者聯絡人資料：android.permission.READ_CONTACTS&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式設定時間區域android.permission.SET_TIME_ZONE&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許存取振動設備：android.permission.VIBRATE&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式寫入資料：android.permission.WRITE_OWNER_DATA&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許一個程式存取精確位置(如GPS)：android.permission.ACCESS_FINE_LOCATION&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式存取Wi-Fi網路狀態訊息：android.permission.ACCESS_WIFI_STATE&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式更新手機電池統計訊息：android.permission.BATTERY_STATS&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式連接到已配對的藍牙設備：android.permission.BLUETOOTH&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;請求存取使用照相設備：android.permission.CAMERA&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式刪除暫存檔案：android.permission.DELETE_CACHE_FILES&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;允許程式改變Wi-Fi連接狀態：android.permission.CHANGE_WIFI_STATE&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/7754661102310356655/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/08/android-note-androidmanifestxml.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7754661102310356655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7754661102310356655'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/08/android-note-androidmanifestxml.html' title='(Android Note) AndroidManifest.xml 相關應用權限'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-6152940638428997123</id><published>2013-08-06T22:18:00.000-07:00</published><updated>2013-08-06T23:00:36.714-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) App 呼叫另一個 App</title><content type='html'>&lt;span style=&quot;color: red; font-family: monospace; font-size: large;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;1. code&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;Intent intent = new Intent(&quot;android.intent.action.MAIN&quot;);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;intent.setClassName(&quot;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 22px;&quot;&gt;package&lt;/b&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;&quot;, &quot;package.class&quot;); &lt;span style=&quot;color: blue;&quot;&gt;//package name and class name&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;startActivity(intent);&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: monospace; line-height: 22px;&quot;&gt;&amp;lt;!--隱藏不顯示在桌面 &amp;nbsp; &amp;lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&amp;gt; --&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/6152940638428997123/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/08/android-note-app-app.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/6152940638428997123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/6152940638428997123'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/08/android-note-app-app.html' title='(Android Note) App 呼叫另一個 App'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-4955014344875377485</id><published>2013-05-31T00:28:00.002-07:00</published><updated>2013-05-31T00:28:26.688-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) Refresh Tabhost</title><content type='html'>&lt;b&gt;加入此行(addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))，每次按tab鍵就會重整.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;example:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;new Intent(this,X.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/4955014344875377485/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/05/android-note-refresh-tabhost.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/4955014344875377485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/4955014344875377485'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/05/android-note-refresh-tabhost.html' title='(Android Note) Refresh Tabhost'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3963324420337088554</id><published>2013-05-29T20:20:00.003-07:00</published><updated>2013-05-29T20:20:43.429-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) is not valid; is your activity running?</title><content type='html'>&lt;b&gt;由於父activity包含子activity，但是子的activity要產生一個new AlertDialog.Builder(this)，此時就會發生錯誤。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;解決方式，把&lt;span style=&quot;color: red;&quot;&gt;this改成指向父節點getParent()&lt;/span&gt;。&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3963324420337088554/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/05/android-note-is-not-valid-is-your.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3963324420337088554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3963324420337088554'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/05/android-note-is-not-valid-is-your.html' title='(Android Note) is not valid; is your activity running?'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3612888691635615538</id><published>2013-02-28T19:21:00.003-08:00</published><updated>2013-02-28T19:22:37.739-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>android:Theme 用法</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;說明&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(1) /res/values/目錄, 預設的styles.xml&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;resources&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;style name=&quot;AppTheme&quot; parent=&quot;android:Theme.Black&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/resources&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(2) 參數&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Light&quot; &lt;span style=&quot;color: blue;&quot;&gt;//背景為白色&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Light.NoTitleBar&quot;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//白色背景並無標題欄&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Light.NoTitleBar.Fullscreen&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: red; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//白色背景，無標題欄，全螢幕&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Black&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//背景黑色&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Black.NoTitleBar&quot;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//黑色背景，無標題欄&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Black.NoTitleBar.Fullscreen&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//黑色背景，無標題欄，全螢幕&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Translucent&quot; //半透明&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Translucent.NoTitleBar&quot;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Translucent.NoTitleBar.Fullscreen&quot;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Panel&quot;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Light.Panel&quot;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;@android:style/Theme.Dialog&quot; &lt;span style=&quot;color: blue;&quot;&gt;//將一個Activity顯示為話框模式&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;@android:style/Theme.NoTitleBar&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//無標題欄&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;@android:style/Theme.NoTitleBar.Fullscreen&quot;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//無標題欄，全螢幕&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Wallpaper&quot; &lt;span style=&quot;color: blue;&quot;&gt;//系統桌面為應用程式背景&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Wallpaper.NoTitleBar&quot; &lt;span style=&quot;color: blue;&quot;&gt;//系統桌面為應用程式背景，無標題欄&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
android:theme=&quot;Theme.Wallpaper.NoTitleBar.Fullscreen&quot; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;//系統桌面為應用程式背景，無標題欄，全螢幕&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3612888691635615538/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/02/androidtheme.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3612888691635615538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3612888691635615538'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/02/androidtheme.html' title='android:Theme 用法'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3500192027954524512</id><published>2013-01-15T20:30:00.003-08:00</published><updated>2013-01-15T20:42:24.597-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 驗證是否有網路連線</title><content type='html'>&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. code&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;//判斷當前網路連接狀態 &amp;nbsp;、0 無連接 、1 3G、2 WIFI&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;public static int checkNetworkInfo(Context context){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&amp;nbsp;   &lt;/span&gt;int stateType = 0;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;State mobile =&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState(); &lt;span style=&quot;color: blue;&quot;&gt;//取得3G連線狀態&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;State wifi =&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState();&lt;span style=&quot;color: blue;&quot;&gt; //取得WIFI連線狀態&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (mobile == State.CONNECTED || mobile == State.CONNECTING){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;stateType = 1;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (wifi == State.CONNECTED || wifi == State.CONNECTING){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;stateType = 2;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;return stateType;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;b&gt;&lt;/b&gt;
&lt;ul style=&quot;display: inline !important;&quot;&gt;
&lt;li style=&quot;display: inline !important;&quot;&gt;&lt;div style=&quot;color: #3d85c6; font-weight: bold;&quot;&gt;
&lt;ul style=&quot;display: inline !important;&quot;&gt;
&lt;li style=&quot;display: inline !important;&quot;&gt;&lt;b&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
*&lt;span style=&quot;color: #3d85c6; font-weight: bold;&quot;&gt;AndroidManifest 開啟權限&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;b&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&amp;lt;uses-permissionandroid:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;//訪問存取網路狀態許可權限&lt;/span&gt;&lt;/div&gt;
&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;b&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&amp;lt;uses-permissionandroid:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&amp;gt; &lt;span style=&quot;color: blue;&quot;&gt;//訪問存取wifi狀態許可權限&lt;/span&gt;&lt;/div&gt;
&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;b&gt;&lt;div style=&quot;display: inline !important;&quot;&gt;
&amp;lt;uses-permission android:name=&quot;android.permission.MODIFY_PHONE_STATE&quot; /&amp;gt;&lt;span style=&quot;color: blue;&quot;&gt; //訪問存取手機狀態許可權限&lt;/span&gt;&lt;/div&gt;
&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3500192027954524512/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note_15.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3500192027954524512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3500192027954524512'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note_15.html' title='(Android Note) 驗證是否有網路連線'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-7787798155219612908</id><published>2013-01-15T20:25:00.001-08:00</published><updated>2013-01-15T20:25:31.785-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) AlertDialog.Builder</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;final AlertDialog.Builder builder=new AlertDialog.Builder(this);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;builder.setTitle(&quot; Test &quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;builder.setMessage(&quot; Test &quot;);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;builder.setIcon(android.R.drawable.ic_dialog_alert);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;//3種事件處理方式&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;builder.setPositiveButton(&quot;OK&quot;, new OnClickListener() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; public void onClick(DialogInterface dialog, int which) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;});&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;builder.setNegativeButton(&quot;Cancel&quot;, new OnClickListener() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; public void onClick(DialogInterface dialog, int which) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; // TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;});&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;builder.setNeutralButton(&quot;other things&quot;, new OnClickListener() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; @Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; public void onClick(DialogInterface dialog, int which) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; // TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;});&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;builder.show();&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/7787798155219612908/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note-alertdialogbuilder.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7787798155219612908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7787798155219612908'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note-alertdialogbuilder.html' title='(Android Note) AlertDialog.Builder'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-6448977860597189907</id><published>2013-01-03T01:05:00.001-08:00</published><updated>2013-01-03T01:07:10.253-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 內部和外部儲存空間大小</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) sdcard 是否存在&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;return true;&lt;span style=&quot;color: blue;&quot;&gt; //存在&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;return false; &lt;span style=&quot;color: blue;&quot;&gt;//不存在&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(2) 內部儲存空間&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;File path = android.os.Environment.getDataDirectory();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;StatFs sf = new StatFs(path.getPath());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long bs = sf.getBlockSize();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long ab = stat.getAvailableBlocks();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long bc = stat.getBlockCount();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;retrun bs*ab; &lt;span style=&quot;color: blue;&quot;&gt;//剩餘儲存空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;retrun bs*bc;&lt;span style=&quot;color: blue;&quot;&gt; //總儲存空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(3) sdcard儲存空間&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;File path = android.os.Environment.getExternalStorageDirectory();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;StatFs sf = new StatFs(path.getPath());&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long bs = sf.getBlockSize();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long ab = stat.getAvailableBlocks();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;long bc = stat.getBlockCount();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;retrun bs*ab; &lt;span style=&quot;color: blue;&quot;&gt;//剩餘儲存空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;retrun bs*bc;&lt;span style=&quot;color: blue;&quot;&gt; //總儲存空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;2. 說明&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;bs(block size)，在fat32檔案系統&lt;/b&gt;&lt;b&gt;，&lt;/b&gt;&lt;b&gt;&amp;nbsp;block size是 4096 byte，其他可以用&lt;/b&gt;&lt;b&gt;getBlockSize()來找出block size 大小。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/6448977860597189907/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/6448977860597189907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/6448977860597189907'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2013/01/android-note.html' title='(Android Note) 內部和外部儲存空間大小'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-761859890874094118</id><published>2012-12-12T23:52:00.000-08:00</published><updated>2012-12-12T23:52:14.223-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 畫面横屏OR值屏</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&amp;nbsp;setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);&lt;span style=&quot;color: blue;&quot;&gt;//畫面直向&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);&lt;span style=&quot;color: blue;&quot;&gt;//畫面橫向&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;以上畫面只要轉方向時，activity 會重新執行。&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;如果不要 activity 重新執行，需要在 AndroidManifest.xml 檔案中，在 activity 加入&amp;nbsp;android:configChanges=&quot;orientation|keyboardHidden&quot; 就會禁止重新執行。&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/761859890874094118/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/12/android-note-or.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/761859890874094118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/761859890874094118'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/12/android-note-or.html' title='(Android Note) 畫面横屏OR值屏'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-2300655667559721352</id><published>2012-11-22T00:19:00.003-08:00</published><updated>2012-11-22T00:19:22.419-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) webview 字體設定</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) 卷軸設定&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;WebView.setScrollBarStyle(SCROLLBARS_OUTSIDE_OVERLAY);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;WebView.setHorizontalScrollBarEnabled(false);&lt;span style=&quot;color: blue;&quot;&gt; //橫軸&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;WebView.setVerticalScrollBarEnabled(false); &lt;span style=&quot;color: blue;&quot;&gt;//縱軸&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;(2)字體&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;WebView.getSettings().setDefaultFontSize(value); &lt;span style=&quot;color: blue;&quot;&gt;//value 數值&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp;OR&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;WebView.getSettings().setTextSize(WebSettings.TextSize.Normal);&lt;span style=&quot;color: blue;&quot;&gt; //TextSize只有5種設定方式(Smallest、Smaller、Normal、Larger、Largest)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/2300655667559721352/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note-webview.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2300655667559721352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2300655667559721352'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note-webview.html' title='(Android Note) webview 字體設定'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-8285324080244506113</id><published>2012-11-15T01:15:00.004-08:00</published><updated>2012-11-15T01:15:43.255-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 圖片依照螢幕節析度自動調整</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1.&amp;nbsp;Introduction&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) 有時用bitmap會發覺內存溢出導致error，主要是圖片太大才會發生此情況，以下code &amp;nbsp;可以解&lt;/b&gt;&lt;b&gt;決&lt;/b&gt;&lt;b&gt;內存溢出&lt;/b&gt;&lt;b&gt;問題。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(2)目前android mobile device太多不同的節析度，此code 為了讓圖片可以依照節析度自行縮放。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;2. Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;changePictureWH(讀取圖檔, 元件);&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;//getResources().openRawResource(R.drawable.X), 元件&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;public void changePictureWH(InputStream resources, ImageButton id) {&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Bitmap bmp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;BitmapFactory.Options bfo = new BitmapFactory.Options();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; bfo.inJustDecodeBounds = true;&lt;span style=&quot;color: blue;&quot;&gt; //不分配空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; bmp = BitmapFactory.decodeStream(resources,null,bfo);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; int picWidth &amp;nbsp;= bfo.outWidth; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;//圖片寬度&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; int picHeight = bfo.outHeight;&lt;span style=&quot;color: blue;&quot;&gt; //圖片長度&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; int screenWidth = Define_Variable.scalWidth;&lt;span style=&quot;color: blue;&quot;&gt; //螢幕寬度 &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; int screenHeight = Define_Variable.scalHeight; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;//螢幕長度&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; bfo.inSampleSize = 1; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;//isSampleSize 指圖片縮放程度 = 100/isSampleSize, 值越大圖越小&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; //根據螢幕的大小和圖片大小計算比例&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; if(picWidth &amp;gt; picHeight){ &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; if(picWidth &amp;gt; screenWidth) &amp;nbsp;bfo.inSampleSize = picWidth/screenWidth; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; }else{ &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; if(picHeight &amp;gt; screenHeight) &amp;nbsp;bfo.inSampleSize = picHeight/screenHeight; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; } &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;//產生經過縮放有像素的bitmap&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; bfo.inJustDecodeBounds = false; &lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;//從新分配空間&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; bmp = BitmapFactory.decodeStream(resources,null,bfo);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; id.setImageBitmap(bmp);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; }&lt;/b&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/8285324080244506113/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note_15.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/8285324080244506113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/8285324080244506113'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note_15.html' title='(Android Note) 圖片依照螢幕節析度自動調整'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-5220389977071795713</id><published>2012-11-15T00:24:00.001-08:00</published><updated>2012-11-15T01:16:25.084-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 自動觸發事件</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;view.performClick();&lt;span style=&quot;color: blue;&quot;&gt; //view定義的元件, performClick()自動觸發click事件&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/5220389977071795713/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/5220389977071795713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/5220389977071795713'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/11/android-note.html' title='(Android Note) 自動觸發事件'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3267480924911626933</id><published>2012-10-31T01:40:00.001-07:00</published><updated>2012-10-31T01:41:39.195-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) listview 移置最後一行</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;listview.postDelayed(new Runnable() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void run() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;listview.setSelection(data.size()); &lt;span style=&quot;color: blue;&quot;&gt;//設定移到第幾個item&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}, 0);&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3267480924911626933/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-listview_31.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3267480924911626933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3267480924911626933'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-listview_31.html' title='(Android Note) listview 移置最後一行'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-1052060961761798502</id><published>2012-10-25T22:14:00.003-07:00</published><updated>2012-10-25T22:14:35.506-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) Timer 使用方法</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;1. Code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(1) schedule 用法&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;schedule(TimerTask task,&amp;nbsp;&lt;/b&gt;&lt;b&gt;long delay&lt;/b&gt;&lt;b&gt;) &lt;span style=&quot;color: blue;&quot;&gt;// 只執行一次，&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;long delay 延遲時間(單位毫秒)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;schedule(TimerTask task, long delay, long period) &lt;span style=&quot;color: blue;&quot;&gt;//重複執行 ，&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;long period 週期多久執行&lt;/b&gt;&lt;b&gt;(單位毫秒)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(2)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;public class TimerState extends Activity{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Timer mTimer;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public int num;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; public void onCreate(Bundle savedInstanceState) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super.onCreate(savedInstanceState);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setContentView(R.layout.timerstate);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;num &amp;nbsp;= 0;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mTimer = new Timer();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mTimer.schedule( new startTimer() , 0, 1000 ); &lt;span style=&quot;color: blue;&quot;&gt;//第二個參數 0 代表無延遲時間, 第三個參數 單位毫秒&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//mTimer.cancel();&lt;span style=&quot;color: blue;&quot;&gt;//暫停&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;//使用schedule方法，必須要有物件繼承imerTask，方可使用&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public class startTimer extends TimerTask{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void run() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;num++;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Log.e(&quot;num&quot;, &quot;&quot;+num);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/1052060961761798502/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-timer.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1052060961761798502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1052060961761798502'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-timer.html' title='(Android Note) Timer 使用方法'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-4501249157150575671</id><published>2012-10-25T19:53:00.000-07:00</published><updated>2012-10-25T19:53:25.962-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) EditText 編輯觸發事件</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;public class EditTextEvent extends Activity{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EditText eteET;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; public void onCreate(Bundle savedInstanceState) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super.onCreate(savedInstanceState);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setContentView(R.layout.edittextevent);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;eteET = (EditText)findViewById(R.id.eteET);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;eteET.addTextChangedListener(eteETListener); &lt;span style=&quot;color: blue;&quot;&gt;//監聽改變文字事件&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; }&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; public TextWatcher eteETListener = new TextWatcher(){&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void afterTextChanged(Editable arg0) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;afterTextChanged--&quot;+arg0.toString(), Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//顯示修改後字串內容&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int arg3) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;beforeTextChanged--&quot;+arg0.toString(), Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//顯示修改前字串內容&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;@Override&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void onTextChanged(CharSequence arg0, int arg1, int arg2,&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;int arg3) {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// TODO Auto-generated method stub&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;onTextChanged0--&quot;+arg0.toString(), Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//顯示修改後字串內容&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;onTextChanged1--&quot;+arg1, Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//顯示目前第幾個位置,從0開始&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;onTextChanged2--&quot;+arg2, Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//none&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Toast.makeText(EditTextEvent.this, &quot;onTextChanged3--&quot;+arg3, Toast.LENGTH_SHORT).show();&lt;span style=&quot;color: blue;&quot;&gt;//none&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; };&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/4501249157150575671/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-edittext.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/4501249157150575671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/4501249157150575671'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-edittext.html' title='(Android Note) EditText 編輯觸發事件'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-7272786880369144957</id><published>2012-10-25T19:22:00.000-07:00</published><updated>2012-10-25T19:22:12.127-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 取得手機語系</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(1) Locale.getDefault().getLanguage()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;==&amp;gt;return en, zh ....等&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;(2)&amp;nbsp;Locale.getDefault().getDisplayLanguage()&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;==&amp;gt;return English, 中文....等&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/7272786880369144957/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note_25.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7272786880369144957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7272786880369144957'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note_25.html' title='(Android Note) 取得手機語系'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-2705436208978330098</id><published>2012-10-19T02:09:00.000-07:00</published><updated>2012-10-19T02:17:18.300-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 編譯時，出現Conversion to Dalvik format failed: Unable to execute dex: null </title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. 說明&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 常發生編譯時，出現 Conversion to Dalvik format failed: Unable to execute dex: null 訊息，主要是因為加入 JAR 檔時，以 Add External JARs.... &amp;nbsp;加入；後來搜尋資料，發現以 Add Library/User Library 比較不會有error訊息。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;2. 加入User Library 步驟&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;1. Right-click the project in Eclipse and select &quot;Build Path -&amp;gt; Add Libraries...&quot;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2. Select User Library from the list and click Next.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;3. Click the &quot;User Libraries...&quot; button.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;4. Click &quot;New...&quot; in the User Libraries dialog.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;5. Give the user library a name and select the System library checkbox and click OK.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;6. Highlight the newly added user library in the list and click the &quot;Add JARs...&quot; button and add the desired jar files.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;7. Click OK on the User Libraries dialog.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;8. Make sure the new user library is checked in the Add Library dialog.&lt;/b&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/2705436208978330098/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-conversion-to-dalvik.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2705436208978330098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2705436208978330098'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-conversion-to-dalvik.html' title='(Android Note) 編譯時，出現Conversion to Dalvik format failed: Unable to execute dex: null '/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-563565362398663550</id><published>2012-10-18T18:30:00.002-07:00</published><updated>2012-10-18T18:30:34.757-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 實現全屏方式</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. 在AndroidManifest.xml 文件中，設定Activity為全屏模式。&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;android:theme=&quot;@android:style/Theme.NoTitleBar.Fullscreen&quot;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;2. 程式實現全屏&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;2.1 隱藏狀態欄&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;requestWindowFeature(Window.FEATURE_NO_TITLE);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;2.2 隱藏標題欄&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;2.3 隱藏工具欄&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;此處搜尋過，無法強制隱藏工具欄。&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;PS: 以程式實現全屏，必須&#39;放在 setContentView 前才有效果。&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/563565362398663550/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/563565362398663550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/563565362398663550'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note.html' title='(Android Note) 實現全屏方式'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-1067834372760720137</id><published>2012-10-18T01:56:00.005-07:00</published><updated>2012-10-18T01:58:52.441-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 讀取無線網卡mac位置</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. 添加權限&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: 微软雅黑, Helvetica, Times, Arial, serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;在AndroidManifest.xml加入存取無線網卡狀態權限。&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: 微软雅黑, Helvetica, Times, Arial, serif;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&lt;b&gt;&amp;lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&amp;gt; &amp;lt;!-- 允許讀取WIFI狀態 --&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;2.code&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//讀取無線網卡mac位置&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getLocalWiFiMacAddress() {&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE);&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WifiInfo wi = wm.getConnectionInfo();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return wi.getMacAddress(); //回傳(XX:XX:XX:XX:XX)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/1067834372760720137/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-mac.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1067834372760720137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1067834372760720137'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-mac.html' title='(Android Note) 讀取無線網卡mac位置'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3595204485381262912</id><published>2012-10-04T19:38:00.000-07:00</published><updated>2012-10-04T19:38:12.867-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) webview Javascript使用方法</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-large;&quot;&gt;&lt;b&gt;1. code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String str = &quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&quot; +&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;&amp;lt;button onClick=&#39;javascript:js.setJava(\&quot;HELLO\&quot;)&#39; &amp;gt;執行java的function做處理&amp;lt;/button&amp;gt;&quot; +&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;&amp;lt;div id=&#39;output&#39;&amp;gt;output:&amp;lt;/div&amp;gt;&quot; +&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&quot;&amp;lt;script&amp;gt;document.write(js.getJava());&amp;lt;/script&amp;gt;&quot; +&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; wv = (WebView)findViewById(R.id.webView1);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; wv.addJavascriptInterface(this, &quot;js&quot;);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; wv.getSettings().setJavaScriptEnabled(true);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; wv.loadDataWithBaseURL(&quot;about:blank&quot;,str, &quot;text/html&quot;, &quot;utf-8&quot;, null);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;public void setJava(String value){&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; Log.e(&quot;HELLO&quot;, value);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;public String getJava(){&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;HELLO&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-large;&quot;&gt;&lt;b&gt;2. 說明&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;javascript:js.setJava(\&quot;HELLO\&quot;); &lt;span style=&quot;color: blue;&quot;&gt;//呼叫 java中的程式function&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;script&amp;gt;document.write(js.getJava());&amp;lt;/script&amp;gt;&lt;span style=&quot;color: blue;&quot;&gt; //從java中的function取得值&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;wv.addJavascriptInterface(this, &quot;js&quot;); &lt;span style=&quot;color: blue;&quot;&gt;// 設定webview和javascript溝通的橋梁，別名js&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;b&gt;&amp;nbsp;wv.getSettings().setJavaScriptEnabled(true); &lt;span style=&quot;color: blue;&quot;&gt;//是否允許webveiw執行javascript代碼&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;b&gt;&lt;b&gt;wv.loadDataWithBaseURL(&quot;about:blank&quot;,str, &quot;text/html&quot;, &quot;utf-8&quot;, null); &lt;span style=&quot;color: blue;&quot;&gt;//帶入字串&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;wv.loadUrl(&quot;http://XXX/aaa.php&quot;);&lt;span style=&quot;color: blue;&quot;&gt; //帶入網址&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background-color: white; line-height: 19px;&quot;&gt;wv.loadUrl(&lt;/span&gt;&lt;a href=&quot;http://www.cnblogs.com/dynasty/admin/file:///android_asset/demo.html&quot; style=&quot;background-color: white; line-height: 19px; text-decoration: none;&quot;&gt;file:///android_asset/aaa.html&lt;/a&gt;&lt;span style=&quot;background-color: white; line-height: 19px;&quot;&gt;); &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; line-height: 19px;&quot;&gt;//帶入檔案，檔案位置必須要放置assets/www目錄下才可。至於大多人說放置assets就可以使用，在下是執行都會錯誤&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3595204485381262912/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-webview-javascript.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3595204485381262912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3595204485381262912'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-webview-javascript.html' title='(Android Note) webview Javascript使用方法'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-2184931751349918367</id><published>2012-10-04T18:55:00.007-07:00</published><updated>2012-10-04T18:59:09.032-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) listview 背景用法</title><content type='html'>&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-large;&quot;&gt;&lt;b&gt;1. Code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;1.1 點選 listview 時，去除背景黑色底色&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;android:cacheColorHint=&quot;@android:color/transparent&quot;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;strong style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;strong style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;1.2 自動產生背景色&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;strong style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;
&lt;span style=&quot;color: #2e2e2e;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;1.2.1 先在 drawable 資料夾內產生 dlistview.xml 檔案&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #2e2e2e;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 22px;&quot;&gt;&lt;b&gt;內容:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;!-- 沒有焦點時的背景圖片 --&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;item android:state_window_focused=&quot;false&quot; android:drawable=&quot;@drawable/tools_listviewbackground&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;!-- 非觸摸試下獲得焦點並點選時的背景圖片 --&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;item android:state_focused=&quot;true&quot; android:state_pressed=&quot;true&quot; android:drawable=&quot;@drawable/tools_listviewbackground&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;!-- 觸摸試下獲得焦點並點選時的背景圖片 --&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;item android:state_focused=&quot;false&quot; android:state_pressed=&quot;true&quot; android:drawable=&quot;@drawable/answer3_1&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;!-- 選中時的背景圖片 --&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;item android:state_selected=&quot;true&quot; android:drawable=&quot;@drawable/answer4_1&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;!-- 獲得焦點時的背景圖片 --&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;item android:state_focused=&quot;false&quot; android:drawable=&quot;@drawable/answer4_2&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;/selector&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: purple; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #e69138; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 26px;&quot;&gt;//android:state_selected是被點選&lt;/span&gt;&lt;br style=&quot;background-color: white; line-height: 26px;&quot; /&gt;&lt;span style=&quot;background-color: white; line-height: 26px;&quot;&gt;//android:state_focused是獲得焦點&lt;/span&gt;&lt;br style=&quot;background-color: white; line-height: 26px;&quot; /&gt;&lt;span style=&quot;background-color: white; line-height: 26px;&quot;&gt;//android:state_pressed是點擊&lt;/span&gt;&lt;br style=&quot;background-color: white; line-height: 26px;&quot; /&gt;&lt;span style=&quot;background-color: white; line-height: 26px;&quot;&gt;//android:state_enabled是否可以執行&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e; line-height: 22px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;1.2.2 在java中加入以下&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 22px;&quot;&gt;listview.setSelector(R.drawable.dlistview); //把xml加入到背景選擇器&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #2e2e2e;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 22px;&quot;&gt;之後listview所產生的行為，會依照所定義xml格式所表現。&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;strong style=&quot;color: #2e2e2e; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/2184931751349918367/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-listview.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2184931751349918367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/2184931751349918367'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/10/android-note-listview.html' title='(Android Note) listview 背景用法'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-3553757502816539221</id><published>2012-08-31T01:53:00.003-07:00</published><updated>2012-08-31T01:53:39.997-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 對 EditText 取得和取消 foucs</title><content type='html'>&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. Code&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;EditText et = (EditText) this.findViewById(R.id.et);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;et.requestFocus(); //取得 foucs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;et.clearFocus(); //取消 foucs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;當&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;EditText&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;多個同時使用requestFocus()時，只會執行&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;最後呼叫&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;requestFocus()。&lt;/span&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/3553757502816539221/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-edittext-foucs.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3553757502816539221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/3553757502816539221'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-edittext-foucs.html' title='(Android Note) 對 EditText 取得和取消 foucs'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-8904925377863575971</id><published>2012-08-31T01:39:00.001-07:00</published><updated>2012-08-31T01:39:27.488-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) 呼叫鍵盤</title><content type='html'>&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;1. Code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;1.1 呼叫鍵盤功能，如果鍵盤顯示狀態就隱藏、鍵盤隱藏狀態就顯示。
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;1.2 只隱藏鍵盤&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/8904925377863575971/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note_31.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/8904925377863575971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/8904925377863575971'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note_31.html' title='(Android Note) 呼叫鍵盤'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-1485386781489531568</id><published>2012-08-22T21:04:00.002-07:00</published><updated>2012-08-22T21:05:04.864-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) List用法</title><content type='html'>&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;1. code&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;List li = new ArrayList();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(1)add會將值放置到list的後端， function&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;==&amp;gt; list.add(value)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(3);&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;retrun [1,2,3]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(2)0是list第一個位置，所以會將值放置在前端， function ==&amp;gt; list.add(0,value)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(0,1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(0,2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(0,3);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;retrun [3,2,1]&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(3) 從現有list插入值， list = [1,2,3,4,5]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.add(1,99);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;retrun [1,99,2,3,4,5]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(4) 從現有的list取出值&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;， list = [1,2,3,4,5]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.get(0) ;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;return 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(5)從現有的list搜尋是否有值&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;， list = [1,2,3,4,5]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.indexOf(1);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;找到值會回傳位置， return 0;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.indexOf(99);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;找不到值會回傳-1， return -1;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(6)&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;從現有的list刪除值&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;， list = [1,2,3,4,5]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;list.remove(2);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-size: large;&quot;&gt;return list = [1,3,4,5]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/1485386781489531568/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-list_22.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1485386781489531568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/1485386781489531568'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-list_22.html' title='(Android Note) List用法'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3958957048135874092.post-7888870886502262382</id><published>2012-08-22T20:45:00.000-07:00</published><updated>2012-08-22T20:45:56.521-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>(Android Note) List 容易出錯的部分</title><content type='html'>&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;1. Code&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;class A{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public int a;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;(1) return [4,4,4,4,4]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;public List&amp;lt;A&amp;gt; WordCard1(){ &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;List&amp;lt;A&amp;gt; li = new ArrayList&amp;lt;A&amp;gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A aa;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;aa = new A();&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i=0; i&amp;lt;5); i++){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aa.a = i&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; li.add(aa);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; return li;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-size: medium;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;(2) return [0,1,2,3,4]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;public List&amp;lt;A&amp;gt; WordCard1(){ &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;List&amp;lt;A&amp;gt; li = new ArrayList&amp;lt;A&amp;gt;();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A aa;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i=0; i&amp;lt;5); i++){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;aa = new A();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aa.a = i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; li.add(aa);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp;return li;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
</content><link rel='replies' type='application/atom+xml' href='http://cloud-sunlight.blogspot.com/feeds/7888870886502262382/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-list.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7888870886502262382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3958957048135874092/posts/default/7888870886502262382'/><link rel='alternate' type='text/html' href='http://cloud-sunlight.blogspot.com/2012/08/android-note-list.html' title='(Android Note) List 容易出錯的部分'/><author><name>KentBlog</name><uri>http://www.blogger.com/profile/07113127715537524601</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>