原创 Android 常見錯誤和技巧

1、無法使用網絡 :Permission denied(maybe missing internet permission)        答:在AndroidMainifest.xml中增加允許使用網絡選項(結束標籤之後>):Java代

原创 Spinner控件的使用以及動畫的使用

main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

原创 如何實現啓動畫面

http://topic.csdn.net/u/20110501/00/c63ac497-984d-40cb-b5c3-bdca9abc33a9.html?63219   public class SplashActivity exten

原创 自定義Theme 與 使用

新建color.xml文件 <?xml version="1.0" encoding="utf-8"?> <resources> <drawable name="transparent_background">#FF0000FF</dra

原创 AnalogClock與Handler的使用

main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

原创 android簡單的文件檢索

首先main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/andro

原创 DatePicker 和 TimePicker的使用

main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

原创 ProgressBar的使用

main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

原创 Unparsed aapt error(s)錯誤的處理方法 以及 音樂播放

    方法1:刪除gen目錄下的R.java,然後build project. 方法2: 點 Project--------->clean..   錯誤發生方法: 選中xml文件 點擊run,會在res/layout下生成同名.out

原创 Matrix的使用 圖像的方法縮小

main.xml   <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/andro

原创 ProgressDialog的使用

  A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used

原创 ASCII對照表

工作中居然又要查ASCII對照表。只得又複習一遍     0-9 的ASCII是: 48-57 .        的ASCII是: 46 大寫A-Z是: 65-90 小寫a-z是: 97-122     和小寫的差值剛好是32 換行和回車

原创 NotificationManager的使用

main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

原创 Gallery的使用 以及 AlertDialog的使用

直接貼代碼 和效果: strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, Gallery

原创 天氣預報程序第一篇

天氣情況來源: http://www.google.com/ig/api?hl=zh-cn&weather=Beijing 最後面的代表地區。通過這個URI就可以查詢要查找的天氣狀況了。   保存天氣狀況的類得設計: WeatherInf