原创 日曆代碼的完整版

    var d = new Date(); //獲取系統時間,如果是10月份,month爲9     var year = d.getFullYear();     var month = d.getMonth();     var

原创 android-support-v7-appcompat\res\values-v14\styles_base.xml:24:錯誤

導入的方法參考:http://blog.csdn.net/jiangwei0910410003/article/details/17039683 導入後報錯: android-support-v7-appcompat\res\values

原创 js中, opener,self,parent 區別

轉自http://blog.sina.com.cn/s/blog_6b1ab3be0100pzn7.html

原创 Eclipse “this compilation unit is not on the build path of a java project”

如果通過import  -> git -> local....中加載android 項目(已經使用Git下載到本地),程序有可能會出現“this compilation unit is not on the build path of a

原创 exported receiver does not require permission

在AndroidManifest.xml中使用receiver時,warning “Exported receiver does not require permission”, 解決方案: 1 :可以在警告的recevier 裏面加入

原创 android橫豎屏切換的生命週期和調用方法

android橫豎屏切換比較麻煩,下面總結了橫豎屏切換的內容。 橫豎屏切換時候Activity的生命週期 http://android.tgbus.com/Android/tutorial/201103/346550.shtml 使用

原创 動態輸入String改變TextView的顏色(String轉換成Color)

功能描述:EditText手動輸入字符串“#FFFFFF”等,改變TextView字體的顏色。 方法: int android.graphics.Color.parseColor(String colorString) public

原创 android:singleLine="true",[...]沒有全部顯示,只顯示一個點[.]

現象描述: android:singleLine="true"時,text超出部分顯示[.],沒有顯示省略號[...]。 如果想要一行顯示文本,超出部分用省略號代替。一般會使用android:singleLine="true"。這種解決

原创 IE(IE6/IE7/IE8)支持HTML5標籤

讓IE(ie6/ie7/ie8)支持HTML5元素,我們需要在HTML頭部添加以下JavaScript,這是一個簡單的document.createElement聲明,利用條件註釋針對IE來調用這個js文件。Opera,F

原创 Bundle 保存各類型數據的總結

1.  保存基本類型 Bundle.putString(String key,String value) Bundle.putStringArray(String key,String[] value) Bundle.putBoole

原创 多點手勢識別GestureDetector

       // 手指觸碰到屏幕,由一個 ACTION_DOWN觸發         boolean onDown(MultiMotionEvent e);         // 確定一個press事件,強調手指按下的一段時間(TAP_

原创 Replace "-" with an "en dash" character (–, &&;#8211;) ?

Android開發中,Eclipse的warning: Replace "-" with an "en dash" character (–, &&;#8211;) ? 網上有這樣的解決方法:直接將“-”符號替換爲“–”  (

原创 Andriod中繪(畫)圖----Canvas的使用詳解

       1  Bitmap,可以來自資源/文件,也可以在程序中創建,實際上的功能相當於圖片的存儲空間;        2  Canvas,緊密與Bitmap聯繫,把Bitmap比喻內容的話,那麼Canvas就是提供了衆多方法操作B

原创 Android market:// 鏈接到Google Play 商店

如果只是想啓動Google play store,可以使用: Intent intent = new Intent(); intent.addCategory(Intent.CATEGORY_LAUNCHER); intent.setA

原创 App Indexing

什麼是App Indexing? 將網站上的網頁和智能手機相關聯。已安裝了相應軟件的用戶可以通過網站直接打開應用內容。 詳細信息請參見官網https://developers.google.com/app-indexing/webmast