2012-11-10 37 views
0

可能重複:
creating custom android keyboard layout的Android定製鍵盤xml文件

我開始開發自己的輸入法,但我堅持的XML文件。 Eclipse似乎無法找到鍵盤,也沒有Row和Key類。任何人都可以告訴我如何解決這個問題,或者如何用java編寫一個ime佈局?如果這個描述缺乏信息,請隨時告訴我。總之,感謝大家 首先它表明這一點: NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.

"" does not set the required layout_width attribute: (1) Set to "wrap_content" (2) Set to "match_parent" "" does not set the required layout_height attribute: (1) Set to "wrap_content" 如果我設置layout_widht屬性它表明:

NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.

com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup Exception details are logged in Window > Show View > Error Log The following classes could not be found: - Keyboard (Fix Build Path, Edit XML) - Row (Fix Build Path, Edit XML)

+0

您是否收到任何錯誤消息?發佈它們。 – ajtrichards

+0

如何將\ n添加到我的評論中? – user1708101

回答

7
+0

標準Android輸入法 http://jayxie.com/mirrors/android-sdk/resources/articles/on-screen-inputs.html 而一個教程 HTTP的概述://機器人開發人員.blogspot.co.uk/2009/04/creating-input-method.html 還有很多,我可以繼續尋找頁面 - 先做你的研究吧!這些甚至沒有嘗試解釋如何製作鍵盤佈局...... http://code.google.com/p/hackerskeyboard/ – user1708101

+0

http://grepcode.com/file/repository.grepcode.com/java/ext /com.google.android/android-apps/4.0.1_r1/com/example/android/softkeyboard/SoftKeyboard.java http://www.java2s.com/Code/Android/User-Event/Exampleofwritinganinputmethodforasoftkeyboard.htm 實際上是同樣的事情(例如機器人鍵盤不工作) http://stackoverflow.com/questions/1858950/set-custom-keyboard-for-android-application 的http://計算器。com/questions/5091674/Creating-custom-android-keyboard-layout 這不是我要求的 http://code.google.com/p/softkeyboard/ 我會試試看 – user1708101