calliplus 開發經驗分享
Post on 12-Jul-2015
543 Views
Preview:
TRANSCRIPT
“書法加” app 開發經驗分享
Daniel Kao <daniel.kao@gmail.com>
大綱
• 緣起 • 書法加 app 的功能 • 使用到的小技巧 • 感想 • 參考資料和相關連結
緣起
• 有一天⋯ h4p://www.cns11643.gov.tw/AIDB/query_general.do?acIve=0
自己的字帖自己抓
• h4p://calliplus.appspot.com/
移動字帖
• 轉戰字帖 app → 創造更多附加應用 – 九宮格框線 – 空心字帖 – 練習寫鋼筆字 – 儲存 – 列印 – 離線字型 – 支援更多的字帖 – ⋯
使用到的小技巧
• 編碼問題 • 從網站抓取需要顯示的資料 • 決定呈現方式 • 畫空心的字帖 • 列印
程式流程
Google “cns11643 ronny”
1. 先將編碼對照表轉成sqlite 資料庫 2. 程式第一次啟動時,複製資料庫到可以使
用的目錄 3. 查詢時將 unicode 轉成 cns11643 編碼 4. 透過 cns11643 編碼向全字庫網站搜尋 5. 顯示字帖和進行其他應用
文字檔 → 資料庫
• h4ps://github.com/plateaukao/cns11643query/blob/master/cns_unicode1_1.txt
CNS11643
unicode
文字檔 → 資料庫 • https://github.com/plateaukao/cns11643query/blob/master/createDB.py
• 自建 sqlite 資料庫,塞轉換表進去
查詢 public class DatabaseHelper extends SQLiteOpenHelper
從網站抓取需要顯示的資料
• jsoup
⋯ 抓網頁中 ⋯
決定呈現方式
• 搜尋輸入列 + ListView • ViewPager + ListView • LinearLayout 和 ImageView + Bu4ons
畫空心的字帖、九宮格框線
• 空心字帖硬幹法
列印
有時還是想看紙本啊⋯
列印
h4ps://developer.android.com/training/prinIng/custom-‐docs.html
列印
實作 asynctask 在背景畫 canvas
“個人”開發應用的感想
“個人”開發應用的感想
從自己想要的應用做起
善用現成函式庫,把精力花在刀口上
善用免費的資源
如果有空的話,傾聽使用者的意見建議
小眾市場也不錯
參考資料和相關連結 • Android free app 連結
https://play.google.com/store/apps/details?id=info.plateaukao.calliplus.free • 字帖查詢網站
http://calliplus.appspot.com/ • 字帖網站原始碼
https://github.com/plateaukao/cns11643query • 臉書粉絲團
https://www.facebook.com/calliplusandroid
• Android 雲端列印參加文件 • https://developer.android.com/training/printing/index.html • CNS11643 字碼轉換資料
https://github.com/ronnywang/cns11643 • 全字庫網站
http://www.cns11643.gov.tw/MAIDB/welcome.do • Jsoup 函式庫
http://jsoup.org/ • Picasso 函式庫
http://square.github.io/picasso/
top related