參考網址:http://stackoverflow.com/questions/4980002/problems-with-javadoc
android 的 document 好像在安裝 SDK 時本來就包含在內了
只不過大概是我的 NB 安裝時曾經有安裝過 SDK 的安裝包,後來又改用 zip 的 SDK
所以 eclipse 指向的 document 位置是錯的。
Software entities (class, modules, functions, etc.) should be open for extension, but closed for modification. Junior programmers create simple solutions to simple problems. Senior programmers create complex solutions to complex problems. Great programmers find simple solutions to complex problems. 註1:本部落格的範例程式碼在 2015 年以前的文章中,大多是以全型空白做縮排。如需服用,請自行用文字編輯器的取代功能把全型空白取代成半型空白。
- Bertrand Meyer
- Charles Connell
註2:本部落格的內容授權請參閱部落格底部的授權宣告。
參考網址:http://stackoverflow.com/questions/4980002/problems-with-javadoc
android 的 document 好像在安裝 SDK 時本來就包含在內了
只不過大概是我的 NB 安裝時曾經有安裝過 SDK 的安裝包,後來又改用 zip 的 SDK
所以 eclipse 指向的 document 位置是錯的。
簡單的作法可以參考 [Android] AlertDialog-嵌入客製化表單
在 AlertDialog 中加入 EditText,不過上面沒有取得 EditText 內容的方法
下面是我的 code:
有時候直接看資料庫內容還是比較方便,可以確認寫入的資料是否正確
在模擬器中是必須先進去 Android 的 Android Debug Bridge(即 adb)模式
才有辦法讀取資料庫的檔案並且直接對資料庫下 SQL statement 查看或更改資料庫內容。
圖文說明可以參考一個大陸的網頁:adb shell下查看sqlite數據庫
範例內容跟 Android Developer 官方的範例其實有點類似
不過我個人傾向的事件寫法是在別的地方寫好 function
然後在設定 onClick 之類的事件時再指定到我寫好的 function
官方範例用下面這種寫法我覺得會讓程式碼很亂....
pucliv onCreate() {
...
mPickDate.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
showDialog(DATE_DIALOG_ID);
}
});
...
}
官方的文件 Declaring Layout 中有以下說明:
The at-symbol (@) at the beginning of the string indicates that the XML parser should parse and expand the rest of the ID string and identify it as an ID resource. The plus-symbol (+) means that this is a new resource name that must be created and added to our resources (in the R.java file). There are a number of other ID resources that are offered by the Android framework. When referencing an Android resource ID, you do not need the plus-symbol, but must add the android package namespace, like so:
android:id="@android:id/empty"
意即,@ 表示 XML parser 需要將接下來的字串轉換成 ID resource,其中 @+ 表示這是新的 resource name,必須新建到 R.java 內;@android:id 則表示指向的這個 resource name 是已經存在的 resource。
gasolin 寫的 Android 入門教學
http://code.google.com/p/androidbmi/wiki/IntroAndroid
「Brad Free School 趙令文自由學校」,也是入門教學的網站
http://school.brad.tw/mod/resource/index.php?id=67
「Android學習筆記」,有一些比較基本的 Android 範例程式碼!
http://cooking-java.blogspot.com/search/label/Android
「A Visual Guide to Android GUI Widgets」,顯示 Android 上可用的一些 view 的長相,另外這個網站本身有提供 droiddraw 這個圖形化介面,可以幫助使用者快速產生 Android 需要的介面的 XML 檔。
http://www.droiddraw.org/widgetguide.html
「國立金門大學 九十六學年度資訊工程學系專題 Android教學範例」,有一些基本應用的範例,註解也寫得還蠻詳細的~
http://gogkmit.wikidot.com/start
「靈機一動:我的專案網」,有一些比較基本的 Android 程式教學
http://www.myproject.com.tw/node/19
其實原本是要直接讀寫 Excel 的,但時間上來不及讓我慢慢找相關資料
只大概知道可以用Microsoft.Office.Interop.Excel 來做
不過簡單測了一下卻出現 Excel 檔案打不開的問題(疑似是安全性問題之類的?)
另外還可以用 NPOI 函式庫,好像網路上蠻多人都用這個方法的。
用 OLEDB 把 Excel 當做小型資料庫來處理的話
主要缺點就是不支援 DELETE,只能 INSERT 和 UPDATE
所以遇到要 DELETE 時只能建新的 EXCEL,把要保留的 DataRow 都寫過去(INSERT)。