【问题标题】:Develop soft keyboard IME [duplicate]开发软键盘输入法[重复]
【发布时间】:2012-11-17 17:19:01
【问题描述】:

我正在寻找为 android 开发自定义 IME/软键盘。我在这里看到了一些关于 SO 的信息,但是一些链接像这个答案一样被破坏了: How to develop a soft keyboard for Android?

有没有人知道任何自定义 IME/软键盘的示例或教程以供参考?

【问题讨论】:

  • Android Samples
  • New > other > Android > Android sample project > Android x.x > SoftKeyboard :)
  • 我看了看,但我没有看到任何 android 版本下的软键盘示例,为什么会这样?
  • 当我尝试打开示例中的布局时,出现以下错误,The following classes could not be instantiated: - com.example.android.softkeyboard.LatinKeyboardView (Open Class, Show Error Log)

标签: android


【解决方案1】:

发生这种情况是因为您尝试运行的代码只能在 api 版本 15 或更高版本的设备上成功执行。

api 版本较低的设备没有 android.preference.preferenceFragment 类。

您的清单文件中也没有任何活动。实际上系统正在尝试查找扩展 PreferenceFragment 的 ImePreference 活动,并且由于该活动不可用,因此无法找到导致崩溃的活动。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-12
    • 1970-01-01
    • 2014-04-07
    • 1970-01-01
    • 2014-05-08
    • 1970-01-01
    • 1970-01-01
    • 2012-01-20
    相关资源
    最近更新 更多