Thursday, August 05, 2010

CedIME 1.2.0 更新

這次的更新隔了一段比較長的時間,大家久等了!


主要的新功能有:
Froyo 鍵盤裡的轉換語言的方法,按著 spacebar 左右swipe。這個代替了上一個版本直接在鍵盤上 swipe 來轉中英文的方法。主要是因為直接在鍵盤上 swipe 與下面的 multi-touch, extension keyboard 等等功能有衝突。



Froyo 鍵盤裡的數字符號鍵盤廷伸,按下鍵盤往上拉就會出現。


Froyo 鍵盤裡的 multi-touch support,可以更容易地用雙手快速打字。(此功能只在 Android 2.0 以上有效)


其他改善:
- 增加一個 option 可以 disable 自動調整英文標點符號的功能
- .com 鍵改小一點
- 轉到數字符號鍵盤總是先顯示英文的數字符號(因為比較常用)。
- 中文顯示聯想詞的功能可以在有 auto-complete 的 input box 裡使用,包括 google search, browser url bar 等等。
- 解決一個筆劃輸入的問題導致小部分字不能輸入:e.g. 匯
- 解決一些遇然在第一次啓動 CedIME 會發生的 Force Close 問題

Sunday, August 01, 2010

Issue on Android 1.5 TextView

When I implemented the drag-spacebar-to-change-language function in CedIME, It seems to work fine on my Nexus One. However testing it on HTC Magic with Android 1.5 reveals a problem - the spacebar drag image won't redraw itself when the spacebar is being dragged.

Since the code in CedIME for the two versions of Android are completely the same, it must be the problem within the Android framework code itself. After two days of tracing / debugging the issue, I found that the problem seems to resides in the TextView class's invalidateDrawable() method. In Android 2.2 this method is reimplemented differently and hence CedIME works fine on Nexus One.

The fix for this come as a sort of a hack. I have to resolve this using Java's reflection mechanism to access some private fields in the Android Framework. Not a very good solution as it may break on future Android versions. But, as long as it works...