锘??xml version="1.0" encoding="utf-8" standalone="yes"?>99久久免费精品国产72精品九九,日本不卡视频一区二区,日韩欧美一区二区三区久久婷婷http://www.aygfsteel.com/smcdl/archive/2010/06/08/323007.htmlteddyteddyMon, 07 Jun 2010 16:15:00 GMThttp://www.aygfsteel.com/smcdl/archive/2010/06/08/323007.htmlhttp://www.aygfsteel.com/smcdl/comments/323007.htmlhttp://www.aygfsteel.com/smcdl/archive/2010/06/08/323007.html#Feedback0http://www.aygfsteel.com/smcdl/comments/commentRss/323007.htmlhttp://www.aygfsteel.com/smcdl/services/trackbacks/323007.html
1 URL picUrl = new URL("http://www.google.com.hk/tools/dlpage/res/chrome/images/chrome-205_noshadow.png");
2 
3 Bitmap pngBM = BitmapFactory.decodeStream(picUrl.openStream());
4 
5 imageView.setImageBitmap(pngBM);

寰堢畝鍗曞惂錛屽摢浣嶆湅鍙嬪鏋滄湁鏇寸畝鍗曠殑鏂規硶璇烽氱煡鎴戙?br />


teddy 2010-06-08 00:15 鍙戣〃璇勮
]]>
Android涔婼hared Preferenceshttp://www.aygfsteel.com/smcdl/archive/2010/06/07/322982.htmlteddyteddyMon, 07 Jun 2010 09:18:00 GMThttp://www.aygfsteel.com/smcdl/archive/2010/06/07/322982.htmlhttp://www.aygfsteel.com/smcdl/comments/322982.htmlhttp://www.aygfsteel.com/smcdl/archive/2010/06/07/322982.html#Feedback0http://www.aygfsteel.com/smcdl/comments/commentRss/322982.htmlhttp://www.aygfsteel.com/smcdl/services/trackbacks/322982.html鎳掑緱鍐嶇炕璇戯紝榪欐搴旇寰堝ソ鐞嗚В錛岀洿鎺ュ皢Dev Guide涓鍒惰繃鏉ャ?br />

The SharedPreferences class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use SharedPreferences to save any primitive data: booleans, floats, ints, longs, and strings. This data will persist across user sessions (even if your application is killed).

To get a SharedPreferences object for your application, use one of two methods:

  • getSharedPreferences() - Use this if you need multiple preferences files identified by name, which you specify with the first parameter.
  • getPreferences() - Use this if you need only one preferences file for your Activity. Because this will be the only preferences file for your Activity, you don't supply a name.

To write values:

  1. Call edit() to get a SharedPreferences.Editor.
  2. Add values with methods such as putBoolean() and putString().
  3. Commit the new values with commit()

To read values, use SharedPreferences methods such as getBoolean() and getString().

Here is an example that saves a preference for silent keypress mode in a calculator:


 1public class Calc extends Activity {
 2    public static final String PREFS_NAME = "MyPrefsFile"
;
 3

 4
    @Override
 5    protected void onCreate(Bundle state)
{         
 6       super
.onCreate(state);
 7
       . . .
 8

 9       // Restore preferences

10       SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
11       boolean silent = settings.getBoolean("silentMode"false
);
12
       setSilent(silent);
13    }

14
15
    @Override
16    protected void onStop()
{
17       super
.onStop();
18

19      //
 We need an Editor object to make preference changes.
20      // All objects are from android.context.Context

21      SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
22      SharedPreferences.Editor editor =
 settings.edit();
23      editor.putBoolean("silentMode"
, mSilentMode);
24

25      // Commit the edits!

26      editor.commit();
27    }

28}


teddy 2010-06-07 17:18 鍙戣〃璇勮
]]>
Android涔嬩嬌鐢ㄧ鏈夊瓨鍌?/title><link>http://www.aygfsteel.com/smcdl/archive/2010/06/07/322980.html</link><dc:creator>teddy</dc:creator><author>teddy</author><pubDate>Mon, 07 Jun 2010 08:28:00 GMT</pubDate><guid>http://www.aygfsteel.com/smcdl/archive/2010/06/07/322980.html</guid><wfw:comment>http://www.aygfsteel.com/smcdl/comments/322980.html</wfw:comment><comments>http://www.aygfsteel.com/smcdl/archive/2010/06/07/322980.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/smcdl/comments/commentRss/322980.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/smcdl/services/trackbacks/322980.html</trackback:ping><description><![CDATA[<p style="font-size: 12pt; margin-right: 0px" dir="ltr"><span style="font-size: 18pt"><span style="font-size: 14pt">棣栧厛鍐呴儴瀛樺偍璺緞涓?data/data/<span style="color: red"><em><strong>youPackageName</strong></em></span>/錛屼笅闈㈣瑙g殑鍚勮礬寰勯兘鏄熀浜庝綘鑷繁鐨勫簲鐢ㄧ殑鍐呴儴瀛樺偍璺緞涓嬨傛墍鏈夊唴閮ㄥ瓨鍌ㄤ腑淇濆瓨鐨勬枃浠跺湪鐢ㄦ埛鍗歌澆搴旂敤鐨勬椂鍊欎細琚垹闄ゃ?br /> <br /> 涓銆?nbsp;files<br /> 1. Context.getFilesDir()錛岃鏂規硶榪斿洖/data/data/<span style="color: red"><em><strong>youPackageName</strong></em></span>/files鐨凢ile瀵硅薄銆?br /> 2. Context.openFileInput()涓嶤ontext.openFileOutput()錛屽彧鑳借鍙栧拰鍐欏叆files涓嬬殑鏂囦歡錛岃繑鍥炵殑鏄疐ileInputStream鍜孎ileOutputStream瀵硅薄銆?br /> 3. Context.fileList()錛岃繑鍥瀎iles涓嬫墍鏈夌殑鏂囦歡鍚嶏紝榪斿洖鐨勬槸String[]瀵硅薄銆?br /> 4. Context.deleteFile(String)錛屽垹闄iles涓嬫寚瀹氬悕縐扮殑鏂囦歡銆?br /> <br /> 浜屻乧ache<br /> 1. Context.getCacheDir()錛岃鏂規硶榪斿洖/data/data/<span style="color: red"><em><strong>youPackageName</strong></em></span>/cache鐨凢ile瀵硅薄銆?br /> <br /> 涓夈乧ustom dir</span></span></p> <span style="font-size: 14pt"><span style="font-size: 14pt">getDir(String name, int mode)錛岃繑鍥?data/data/<span style="color: red"><em><strong>youPackageName</strong></em></span>/涓嬬殑鎸囧畾鍚嶇О鐨勬枃浠跺すFile瀵硅薄錛屽鏋滆鏂囦歡澶逛笉瀛樺湪鍒欑敤鎸囧畾鍚嶇О鍒涘緩涓涓柊鐨勬枃浠跺す銆?/span><br /> </span> <img src ="http://www.aygfsteel.com/smcdl/aggbug/322980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/smcdl/" target="_blank">teddy</a> 2010-06-07 16:28 <a href="http://www.aygfsteel.com/smcdl/archive/2010/06/07/322980.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Android寮鍙戜箣璋冪敤緋葷粺褰╀俊鍙戦佸姛鑳?/title><link>http://www.aygfsteel.com/smcdl/archive/2010/05/19/321406.html</link><dc:creator>teddy</dc:creator><author>teddy</author><pubDate>Wed, 19 May 2010 11:20:00 GMT</pubDate><guid>http://www.aygfsteel.com/smcdl/archive/2010/05/19/321406.html</guid><wfw:comment>http://www.aygfsteel.com/smcdl/comments/321406.html</wfw:comment><comments>http://www.aygfsteel.com/smcdl/archive/2010/05/19/321406.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/smcdl/comments/commentRss/321406.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/smcdl/services/trackbacks/321406.html</trackback:ping><description><![CDATA[<p><span style="font-size: 18pt"><span style="font-size: 12pt">緇忚繃涓嶆柇鐨勬祴璇曟渶緇堝緱鍒?涓粨鏋滐細<br /> <br /> <br /> 1.閫傜敤浜庢ā鎷熷櫒鍜孫Phone</span></span></p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #008080">1</span><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><span style="color: #000000">Intent sendIntent </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000"> Intent(Intent.ACTION_SEND);  <br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(</span><span style="color: #000000">"</span><span style="color: #000000">file:///sdcard/map.jpg</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">)); <br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />sendIntent.setType(</span><span style="color: #000000">"</span><span style="color: #000000">image/jpeg</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">);  <br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />startActivity(sendIntent); </span></span></span></div> <p><br /> <span style="font-size: 18pt"><span style="font-size: 12pt">2.閫傜敤浜嶩ero錛堟湭嫻嬭瘯鏄惁鏀寔鍏朵粬HTC鎵嬫満錛?/span></span></p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #008080">1</span><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><span style="color: #000000">Intent sendIntent </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Intent(</span><span style="color: #000000">"</span><span style="color: #000000">android.intent.action.SEND_MSG</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">);  <br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(</span><span style="color: #000000">"</span><span style="color: #000000">file:///sdcard/map.jpg</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">)); <br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />sendIntent.setType(</span><span style="color: #000000">"</span><span style="color: #000000">image/jpeg</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">);  <br /> </span><span style="color: #008080">4</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />startActivity(sendIntent); </span></span></span></div> <p><br /> <span style="font-size: 18pt"><span style="font-size: 12pt">3.鐩墠涓烘鍦ㄥ鏁版墜鏈轟笂宸ヤ綔姝e父鐨勪唬鐮?/span></span></p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #008080">1</span><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /><span style="color: #000000">Intent intent </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000"> Intent(Intent.ACTION_SEND);<br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />intent.setClassName(</span><span style="color: #000000">"</span><span style="color: #000000">com.android.mms</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">com.android.mms.ui.ComposeMessageActivity</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">);<br /> </span><span style="color: #008080">3</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(</span><span style="color: #000000">"</span><span style="color: #000000">file:///sdcard/map.jpg</span><span style="color: #000000">"</span><span style="color: #000000">));  </span><span style="color: #008000">//</span><span style="color: #008000"> imageUri set previously</span></span></span><span style="color: #008000"><br /> </span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #008080">4</span><span style="color: #008000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" /></span><span style="color: #000000">intent.setType(</span><span style="color: #000000">"</span><span style="color: #000000">image/jpeg</span><span style="color: #000000">"</span></span></span><span style="font-size: 18pt"><span style="font-size: 12pt"><span style="color: #000000">);<br /> </span><span style="color: #008080">5</span><span style="color: #000000"><img alt="" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" />startActivity(intent);</span></span></span></div> <p><span style="font-size: 18pt"><br /> </span></p> <p><span style="font-size: 18pt"><span style="font-size: 12pt"> 闇瑕佹敞鎰忕殑涓涓棶棰樻槸涔嬪墠涓鐩寸敤Uri鎸囧悜鑷繁寮鍙戝簲鐢ㄧ殑data鏂囦歡澶逛笅鐨勬枃浠訛紝濮嬬粓鏃犳硶鎴愬姛錛屾渶緇堟崲鎴恠dcard灝監K浜嗭紝鐪嬫潵榪樻槸鏉冮檺鐨勯棶棰樸?/span></span></p> <p><span style="font-size: 18pt"><span style="font-size: 12pt"> </span></span></p> <p><br /> <span style="font-size: 18pt"><span style="font-size: 12pt"> </span></span></p> <img src ="http://www.aygfsteel.com/smcdl/aggbug/321406.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/smcdl/" target="_blank">teddy</a> 2010-05-19 19:20 <a href="http://www.aygfsteel.com/smcdl/archive/2010/05/19/321406.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">凌云县</a>| <a href="http://" target="_blank">彰化县</a>| <a href="http://" target="_blank">元氏县</a>| <a href="http://" target="_blank">诏安县</a>| <a href="http://" target="_blank">绥棱县</a>| <a href="http://" target="_blank">安陆市</a>| <a href="http://" target="_blank">迁安市</a>| <a href="http://" target="_blank">辉南县</a>| <a href="http://" target="_blank">兰溪市</a>| <a href="http://" target="_blank">贵港市</a>| <a href="http://" target="_blank">武定县</a>| <a href="http://" target="_blank">会泽县</a>| <a href="http://" target="_blank">惠东县</a>| <a href="http://" target="_blank">北流市</a>| <a href="http://" target="_blank">青阳县</a>| <a href="http://" target="_blank">洪泽县</a>| <a href="http://" target="_blank">莫力</a>| <a href="http://" target="_blank">宁远县</a>| <a href="http://" target="_blank">四平市</a>| <a href="http://" target="_blank">论坛</a>| <a href="http://" target="_blank">临桂县</a>| <a href="http://" target="_blank">扎鲁特旗</a>| <a href="http://" target="_blank">秀山</a>| <a href="http://" target="_blank">即墨市</a>| <a href="http://" target="_blank">临泽县</a>| <a href="http://" target="_blank">邻水</a>| <a href="http://" target="_blank">祁门县</a>| <a href="http://" target="_blank">苍溪县</a>| <a href="http://" target="_blank">东丰县</a>| <a href="http://" target="_blank">义马市</a>| <a href="http://" target="_blank">南投市</a>| <a href="http://" target="_blank">繁峙县</a>| <a href="http://" target="_blank">阜南县</a>| <a href="http://" target="_blank">江北区</a>| <a href="http://" target="_blank">锡林浩特市</a>| <a href="http://" target="_blank">施甸县</a>| <a href="http://" target="_blank">桐梓县</a>| <a href="http://" target="_blank">达州市</a>| <a href="http://" target="_blank">罗田县</a>| <a href="http://" target="_blank">肥城市</a>| <a href="http://" target="_blank">南安市</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>