eclipse Android自定义键盘xml文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13326072/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:23:11  来源:igfitidea点击:

Android custom keyboard xml file

androidxmleclipselayoutkeyboard

提问by user1708101

Possible Duplicate:
creating custom android keyboard layout

可能的重复:
创建自定义 android 键盘布局

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.

我开始开发自己的 ime,但我被 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"if i set layout_widht attribute it shows:

"" 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.

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)

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)

回答by jcw

There are a few links that you can follow up about this that are on site

您可以在网站上查看一些有关此内容的链接

Set custom keyboard for android application

为Android应用程序设置自定义键盘

creating custom android keyboard layout

创建自定义 android 键盘布局

How to develop a soft keyboard for Android?

如何为Android开发软键盘?

And a couple off site open source programs

和几个异地开源程序

http://code.google.com/p/hackerskeyboard/

http://code.google.com/p/hackerskeyboard/

http://code.google.com/p/softkeyboard/

http://code.google.com/p/softkeyboard/

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://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://www.java2s.com/Code/Android/User-Event/Exampleofwritinganinputmethodforasoftkeyboard.htm

An overview of the standard android input method

android标准输入法概述

http://jayxie.com/mirrors/android-sdk/resources/articles/on-screen-inputs.html

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

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!

那里还有很多,我可以继续翻页——先做你的研究!