Android自定义键盘xml文件 [英] Android custom keyboard xml file
问题描述
可能重复:
创建自定义Android键盘布局
我开始开发自己的ime,但是我遇到了xml文件。 Eclipse似乎找不到键盘,也不能找到Row和Key类。有人可以告诉我如何解决这个问题,或者如何用java编写一个ime布局?如果这个描述缺乏信息可以自由地让我知道。无论如何,感谢大家
首先它显示:
注意:此项目包含Java编译错误,这可能导致自定义视图的渲染失败。首先修复编译问题。
不设置必需的layout_width属性:
(1)设置为wrap_content
(2)设置到match_parent
不设置必需的layout_height属性:
(1)设置为wrap_content
如果我设置layout_widht属性显示: / p>
注意:此项目包含Java编译错误,这可能导致自定义视图的渲染失败。首先修复编译问题。
com.android.layoutlib.bridge.MockView不能转换为android.view.ViewGroup
异常详细信息记录在窗口>显示查看>错误日志
找不到以下类:
- 键盘(修复构建路径,编辑XML)
- 行(修复构建路径,编辑XML)
有几个链接可以跟踪这个网站上的
还有一对外网开源程序
http://code.google。 com / p / hackerskeyboard /
http://code.google.com/p/softkeyboard/
http://www.java2s.com /Code/Android/User-Event/Exampleof输入方法forsoftoftboard.htm
标准android输入法的概述
http://jayxie.com/mirrors/android-sdk/resources/articles/on-screen-inputs.html
和教程
http://android-developers.blogspot.co.uk/2009/04/creating-input-method.html
有更多的东西,我可以继续页面 - 首先做你的研究
Possible Duplicate:
creating custom android keyboard layout
I started developing my own ime, but I'm stuck with the xml file. Eclipse seems to be unable to find the Keyboard, nor Row nor Key classes. Can anyone tell me how to solve this problem or how to code an ime layout with java? If this description lacks of informations fell free to let me know. Anyhow, thanks everyone
at first it shows this:
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" if i set layout_widht attribute it shows:
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)
There are a few links that you can follow up about this that are on site
Set custom keyboard for android application
creating custom android keyboard layout
How to develop a soft keyboard for Android?
And a couple off site open source programs
http://code.google.com/p/hackerskeyboard/
http://code.google.com/p/softkeyboard/
http://www.java2s.com/Code/Android/User-Event/Exampleofwritinganinputmethodforasoftkeyboard.htm
An overview of the standard android input method
http://jayxie.com/mirrors/android-sdk/resources/articles/on-screen-inputs.html
And a tutorial
http://android-developers.blogspot.co.uk/2009/04/creating-input-method.html
There are plenty more out there, I could go on for pages - do your research first!
这篇关于Android自定义键盘xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!