﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-Eros Live</title><link>http://www.blogjava.net/shaobin0604/</link><description>Find the Way</description><language>zh-cn</language><lastBuildDate>Sun, 12 Apr 2026 15:02:57 GMT</lastBuildDate><pubDate>Sun, 12 Apr 2026 15:02:57 GMT</pubDate><ttl>60</ttl><item><title>软键盘挡住控件的问题</title><link>http://www.blogjava.net/shaobin0604/archive/2010/08/25/329917.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Wed, 25 Aug 2010 10:42:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/08/25/329917.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/329917.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/08/25/329917.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/329917.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/329917.html</trackback:ping><description><![CDATA[<p>在manifest的activity节点使用</p> <blockquote> <p>&lt;activity android:windowSoftInputMode="adjustResize" . . . &gt;</p></blockquote> <p>当点击EditText控件弹出软键盘的时候，系统会自动调整控件的位置。</p> <p>代码</p> <blockquote> <p><a title="http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/" href="http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/">http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/</a></p></blockquote> <p>参考</p> <ul> <li><a title="http://androidappdocs-staging.appspot.com/guide/topics/manifest/activity-element.html#wsoft" href="http://androidappdocs-staging.appspot.com/guide/topics/manifest/activity-element.html#wsoft">http://androidappdocs-staging.appspot.com/guide/topics/manifest/activity-element.html#wsoft</a></li> <li><a title="http://www.chengyunfeng.com/2010/07/how-to-show-soft-keyboard" href="http://www.chengyunfeng.com/2010/07/how-to-show-soft-keyboard">http://www.chengyunfeng.com/2010/07/how-to-show-soft-keyboard</a></li></ul><img src ="http://www.blogjava.net/shaobin0604/aggbug/329917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-08-25 18:42 <a href="http://www.blogjava.net/shaobin0604/archive/2010/08/25/329917.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>预置桌面的AppWidget的显示问题</title><link>http://www.blogjava.net/shaobin0604/archive/2010/08/24/329753.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Tue, 24 Aug 2010 03:11:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/08/24/329753.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/329753.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/08/24/329753.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/329753.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/329753.html</trackback:ping><description><![CDATA[<p>AppWidget的初始化有两种方式：</p> <ol> <li>没有提供Configure Activity, 则在 AppWidgetProvider#onUpdate 里初始化。</li> <li>提供Configure Activity, 则在 Configure Activity 里初始化。</li></ol> <p>目前遇到的问题是：</p> <p>在Launcher里可以预先配置桌面显示的AppWidget，如果AppWidget有Configure Activity，则系统在AppWidget的初始化过程不会发送android.appwidget.action.APPWIDGET_CONFIGURE Intent，而只是加载appwidget-provider里配置的initialLayout。这样第二种就不可用，只能用第一种方法。</p><img src ="http://www.blogjava.net/shaobin0604/aggbug/329753.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-08-24 11:11 <a href="http://www.blogjava.net/shaobin0604/archive/2010/08/24/329753.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WebView 相关设置</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/28/327303.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Wed, 28 Jul 2010 04:49:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/28/327303.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/327303.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/28/327303.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/327303.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/327303.html</trackback:ping><description><![CDATA[<h2>1.字体大小</h2> <p>synchronized void<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebSettings.html#setTextSize%28android.webkit.WebSettings.TextSize%29">setTextSize</a>(<a href="http://androidappdocs.appspot.com/reference/android/webkit/WebSettings.TextSize.html">WebSettings.TextSize</a> t) <p>Set the text size of the page. <h2>2.缩放比例</h2> <p>void<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebSettings.html#setSupportZoom%28boolean%29">setSupportZoom</a>(boolean support) <p>Set whether the WebView supports zoom  <p>void<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebView.html#setInitialScale%28int%29">setInitialScale</a>(int scaleInPercent) <p>Set the initial scale for the WebView. <p>boolean<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebView.html#zoomIn%28%29">zoomIn</a>() <p>Perform zoom in in the webview <p>boolean<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebView.html#zoomOut%28%29">zoomOut</a>() <p>Perform zoom out in the webview <h2>3.缩放控件</h2> <p>void<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebSettings.html#setBuiltInZoomControls%28boolean%29">setBuiltInZoomControls</a>(boolean enabled) <p>Sets whether the zoom mechanism built into WebView is used. <h2>4.JavaScript支持</h2> <p>synchronized void<br><a href="http://androidappdocs.appspot.com/reference/android/webkit/WebSettings.html#setJavaScriptEnabled%28boolean%29">setJavaScriptEnabled</a>(boolean flag) <p>Tell the WebView to enable javascript execution.</p><img src ="http://www.blogjava.net/shaobin0604/aggbug/327303.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-28 12:49 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/28/327303.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Database backup to &amp;amp; restore from sdcard(tested on rooted device)</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/26/327154.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Mon, 26 Jul 2010 09:24:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/26/327154.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/327154.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/26/327154.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/327154.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/327154.html</trackback:ping><description><![CDATA[<p>在程序里备份恢复数据</p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">public static boolean backupDatabase() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    File dbFile = new File(Environment.getDataDirectory() + "/data/" + PKG + "/databases/" + DB_NAME);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    File exportDir = new File(Environment.getExternalStorageDirectory(), "pocket-voa");</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    if (!exportDir.exists()) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        exportDir.mkdirs();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    File file = new File(exportDir, dbFile.getName());</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    try {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        file.createNewFile();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        copyFile(dbFile, file);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        return true;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    } catch (IOException e) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        Log.e(TAG, "[backupDatabase] error", e);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        return false;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">public static boolean restoreDatabase() {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    File dbFile = new File(Environment.getDataDirectory() + "/data/" + PKG + "/databases/" + DatabaseHelper.DB_NAME);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    File exportDbFile = new File(Environment.getExternalStorageDirectory() + "/pocket-voa/" + DatabaseHelper.DB_NAME);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    if (!exportDbFile.exists())</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        return false;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    try {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        dbFile.createNewFile();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        copyFile(exportDbFile, dbFile);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        return true;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    } catch (IOException e) {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        Log.e(TAG, "[restoreDatabase] error", e);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        return false;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">private static void copyFile(File src, File dst) throws IOException {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    FileChannel inChannel = new FileInputStream(src).getChannel();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    FileChannel outChannel = new FileOutputStream(dst).getChannel();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    try {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        inChannel.transferTo(0, inChannel.size(), outChannel);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    } finally {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        if (inChannel != null)</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            inChannel.close();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        if (outChannel != null)</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            outChannel.close();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre></div></div>
<p>参考</p>
<ul>
<li><a href="http://stackoverflow.com/questions/3093012/how-to-display-the-phones-sqlite-database-via-sdk">http://stackoverflow.com/questions/3093012/how-to-display-the-phones-sqlite-database-via-sdk</a></li>
<li><a href="http://stackoverflow.com/questions/2232717/android-database-backups">http://stackoverflow.com/questions/2232717/android-database-backups</a></li>
<li><a href="http://stackoverflow.com/questions/1995320/how-to-backup-database-file-to-sdcard-on-android">http://stackoverflow.com/questions/1995320/how-to-backup-database-file-to-sdcard-on-android</a></li></ul><img src ="http://www.blogjava.net/shaobin0604/aggbug/327154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-26 17:24 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/26/327154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于broadcast intents ACTION_SCREEN_ON/OFF?</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/22/326862.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Thu, 22 Jul 2010 11:59:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/22/326862.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/326862.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/22/326862.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/326862.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/326862.html</trackback:ping><description><![CDATA[<p>&nbsp; <blockquote> <p>There are certain events that Android does not want to start up new processes for, so the device does not get too slow from all sorts of stuff all having to run at once. <code>ACTION_SCREEN_ON</code> is one of those. See this <a href="http://stackoverflow.com/questions/1588061/android-how-to-receive-broadcast-intents-action-screen-on-off">previous question</a> for light blue advice on that topic.</p></blockquote> <blockquote> <p>So, you need to ask yourself, "Self, do I really need to get control on those events?". The core Android team would like it if your answer was "no".</p></blockquote> <ul> <li><a href="http://stackoverflow.com/questions/1588061/android-how-to-receive-broadcast-intents-action-screen-on-off">http://stackoverflow.com/questions/1588061/android-how-to-receive-broadcast-intents-action-screen-on-off</a></li> <li><a href="http://stackoverflow.com/questions/2575242/android-intent-action-screen-on-doesnt-work-as-a-receiver-intent-filter">http://stackoverflow.com/questions/2575242/android-intent-action-screen-on-doesnt-work-as-a-receiver-intent-filter</a></li></ul><img src ="http://www.blogjava.net/shaobin0604/aggbug/326862.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-22 19:59 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/22/326862.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在线词典API</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/15/326200.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Thu, 15 Jul 2010 07:45:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/15/326200.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/326200.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/15/326200.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/326200.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/326200.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1.海词 http://api.dict.cn/ws.php?utf8=true&amp;q=#{word} 返回格式XML&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;dict&gt;  &lt;key&gt;word&lt;/key&gt;  &lt;lang&gt;ec&lt;/lang&gt;  &lt;audio&gt;...&nbsp;&nbsp;<a href='http://www.blogjava.net/shaobin0604/archive/2010/07/15/326200.html'>阅读全文</a><img src ="http://www.blogjava.net/shaobin0604/aggbug/326200.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-15 15:45 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/15/326200.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu adb 连接手机提示 no permissions 的解决办法</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325459.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Wed, 07 Jul 2010 07:44:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325459.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/325459.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325459.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/325459.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/325459.html</trackback:ping><description><![CDATA[<p>打开终端输入</p> <blockquote> <p>adb devices</p></blockquote> <p>出现如下内容</p> <blockquote> <p>??????????? no permissions</p></blockquote> <p>原因是启动adb的时候需要有root权限。如果一开始忘记加了sudo, 就必须先终止adb。</p> <blockquote> <p>$ adb kill-server</p> <p>$ sudo adb start-server</p> <p>$ adb devices</p></blockquote> <p>就可以看到设备信息了。</p> <h2>参考</h2> <ul> <li><a href="http://alfred.bt4.org/archives/384">http://alfred.bt4.org/archives/384</a><br><a href="http://happy-coding.com/no-permissions-when-running-adb-devices/">http://happy-coding.com/no-permissions-when-running-adb-devices/</a><br><a href="http://hi.baidu.com/iceliushuai/blog/item/1e506160c5d01f48eaf8f801.html">http://hi.baidu.com/iceliushuai/blog/item/1e506160c5d01f48eaf8f801.html</a></li></ul><img src ="http://www.blogjava.net/shaobin0604/aggbug/325459.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-07 15:44 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/07/325459.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>APN 开关实现原理</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325455.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Wed, 07 Jul 2010 07:28:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325455.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/325455.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325455.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/325455.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/325455.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 原理 关闭APN的原理是在APN信息表(content://telephony/carriers/current)的apn, type字段添加自定义的后缀（参考自APNDroid） 代码 （取自 Quick Settings）  package com.android.settings.widget;&nbsp;import android.content.ContentResolver;impo...&nbsp;&nbsp;<a href='http://www.blogjava.net/shaobin0604/archive/2010/07/07/325455.html'>阅读全文</a><img src ="http://www.blogjava.net/shaobin0604/aggbug/325455.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-07 15:28 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/07/325455.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Android draw9patch在Ubuntu下空白窗口</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325434.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Wed, 07 Jul 2010 04:19:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325434.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/325434.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/07/325434.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/325434.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/325434.html</trackback:ping><description><![CDATA[<h2>环境</h2> <p>Ubuntu 9.10 64bit, sun-jdk-1.5（因需要编译Android源代码）, Android SDK 2.1 </p> <h2>症状</h2> <p>draw9patch 不能正确显示出窗口，没有菜单栏</p> <h2>原因</h2> <p>sun jdk 1.5 的BUG</p> <h2>解决</h2> <p>安装 sun jdk 1.6 </p> <h2>参考</h2> <ol> <li><a title="http://resources2.visual-paradigm.com/index.php/tips-support/53-support/61-blank-screen.html" href="http://resources2.visual-paradigm.com/index.php/tips-support/53-support/61-blank-screen.html">http://resources2.visual-paradigm.com/index.php/tips-support/53-support/61-blank-screen.html</a></li> <li><a title="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585673" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585673">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585673</a></li> <li><a title="https://bugs.launchpad.net/ubuntu/+bug/164004" href="https://bugs.launchpad.net/ubuntu/+bug/164004">https://bugs.launchpad.net/ubuntu/+bug/164004</a></li> <li><a title="http://forums.visual-paradigm.com/posts/list/6719.html" href="http://forums.visual-paradigm.com/posts/list/6719.html">http://forums.visual-paradigm.com/posts/list/6719.html</a></li></ol><img src ="http://www.blogjava.net/shaobin0604/aggbug/325434.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-07 12:19 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/07/325434.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How to Build Android Source Code</title><link>http://www.blogjava.net/shaobin0604/archive/2010/07/02/325103.html</link><dc:creator>Eros</dc:creator><author>Eros</author><pubDate>Fri, 02 Jul 2010 11:58:00 GMT</pubDate><guid>http://www.blogjava.net/shaobin0604/archive/2010/07/02/325103.html</guid><wfw:comment>http://www.blogjava.net/shaobin0604/comments/325103.html</wfw:comment><comments>http://www.blogjava.net/shaobin0604/archive/2010/07/02/325103.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/shaobin0604/comments/commentRss/325103.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/shaobin0604/services/trackbacks/325103.html</trackback:ping><description><![CDATA[
		<h2>Install Ubuntu 9.10</h2>
		<br />
		<h3>Links</h3>
		<ol>
				<li>
						<a title="http://docs.google.com/fileview?id=0B7vaQCSPJU8PNjUzZmU1ZTItYTVlNi00ZDBmLWFhMzMtN2Q3NDA4MzljMjRm&amp;hl=zh_CN" href="http://docs.google.com/fileview?id=0B7vaQCSPJU8PNjUzZmU1ZTItYTVlNi00ZDBmLWFhMzMtN2Q3NDA4MzljMjRm&amp;hl=zh_CN">http://docs.google.com/fileview?id=0B7vaQCSPJU8PNjUzZmU1ZTItYTVlNi00ZDBmLWFhMzMtN2Q3NDA4MzljMjRm&amp;hl=zh_CN</a>
				</li>
				<li>
						<a title="http://ubuntuabc.com/123/?p=38" href="http://ubuntuabc.com/123/?p=38">http://ubuntuabc.com/123/?p=38</a>
				</li>
		</ol>
		<br />
		<h2>Install JDK</h2>
		<blockquote>
				<p>
						<span style="color: rgb(0, 0, 255);">sudo apt-get install sun-java6-jdk</span>
				</p>
				<p>
						<span style="color: rgb(0, 0, 255);">sudo update-alternatives –config java</span>
				</p>
		</blockquote>
		<br />
<img src ="http://www.blogjava.net/shaobin0604/aggbug/325103.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/shaobin0604/" target="_blank">Eros</a> 2010-07-02 19:58 <a href="http://www.blogjava.net/shaobin0604/archive/2010/07/02/325103.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>