進痞客邦『管理後台』→『部落格管理』→『側邊欄位設定』→『頁尾描述』中輸入虛線內的以下程式碼︰

-------------------------------------------------------------------------------------------------------

<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shCore.js"></script>

<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushJava.js"></script>

<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushCSharp.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushDiff.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushPlain.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushSql.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushVb.js"></script>
<script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushXml.js"></script>
<script type="text/javascript">
    SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/3.0.83/scripts/clipboard.swf';
    SyntaxHighlighter.all();
</script>
<link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/3.0.83/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/3.0.83/styles/shThemeDefault.css" id="shTheme"/>
-------------------------------------------------------------------------------------------------------
當要貼上程式碼時,請進入html模式,並輸入以下格式︰
<pre class="brush:java">
//這裡輸入程式碼
</pre>
brush: 後面的內容為使用的是哪種程式語法,範例是Java語法,要用其他語法可參考下面列表。
Brush nameBrush aliasesFile name
Bash/shellbash, shellshBrushBash.js
C#c-sharp, csharpshBrushCSharp.js
C++cpp, cshBrushCpp.js
CSScssshBrushCss.js
Delphidelphi, pas, pascalshBrushDelphi.js
Diffdiff, patchshBrushDiff.js
GroovygroovyshBrushGroovy.js
JavaScriptjs, jscript, javascriptshBrushJScript.js
JavajavashBrushJava.js
Perlperl, plshBrushPerl.js
PHPphpshBrushPhp.js
Plain Textplain, textshBrushPlain.js
Pythonpy, pythonshBrushPython.js
Rubyrails, ror, rubyshBrushRuby.js
ScalascalashBrushScala.js
SQLsqlshBrushSql.js
Visual Basicvb, vbnetshBrushVb.js
XMLxml, xhtml, xslt, html, xhtmlshBrushXml.js
-------------------------------------------------------------範例演示

 

 

public class AndroidDatePicker extends Activity {
private OnClickListener componentClickListener = new OnClickListener(){

		@Override
		public void onClick(View which) {
			switch(which.getId()){
			case (R.id.editText_origin_time):
				final Calendar c = Calendar.getInstance();
				//myYear = c.get(Calendar.YEAR);
				//myMonth = c.get(Calendar.MONTH);
				//myDay = c.get(Calendar.DAY_OF_MONTH);
				showDialog(ID_DATEPICKER);
				break;
			}
			
		}
		
	};

,
創作者介紹

Mazs's Notes

cookiesp 發表在 痞客邦 PIXNET 留言(0) 人氣()