Introduction - If you have any usage issues, please Google them yourself
The Java source code of the Pinyin input method which can be used on the Android2.2 and 2.3, and it is released by Google. Based on it, you can re-compile your own input method.