调用自定义Android键盘在我的应用程序 [英] Calling Custom Android Keyboard in my application

查看:96
本文介绍了调用自定义Android键盘在我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索网颇有几分都没有找到一个单一的资源,可以帮助我叫我的自定义键盘我的应用程序。我使用了android / SDK中的例子/软键盘,并注释掉在qwerty.xml密钥文件的第一行用于测试目的。

I have searched the net quite a bit and haven't found a single resource that can help me call my custom keyboard in my application. I am using the android/sdk examples/soft keyboard and have commented out the first row of keys in the qwerty.xml file for testing purposes.

我试图使在AndroidManifest.xml的变化,但仍不能叫我的自定义键盘。在这方面的任何帮助将是有益的。

I have tried making changes in the AndroidManifest.xml but still can't call my custom keyboard. Any help in this regard will be helpful.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="com.android.artoo" android:versionCode="1"
 android:versionName="1.0">
 <application android:icon="@drawable/icon" android:label="Virtual Keyboard">
  <activity android:name=".MainActivity" android:label="Virtual Keyboard"
   android:windowSoftInputMode="adjustResize">
   <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
   </intent-filter>
  </activity>
  <service android:name=".SoftKeyboard" android:permission="android.permission.BIND_INPUT_METHOD">
   <intent-filter>
    <action android:name="android.view.InputMethod" />
   </intent-filter>
   <meta-data android:name="android.view.im" android:resource="@xml/method" />
  </service>
 </application>
 <uses-sdk android:minSdkVersion="4"></uses-sdk>

</manifest>

感谢您的帮助!

推荐答案

您可能需要在安装APK后,使在手机键盘设置键盘。

You might need to enable the keyboard on the phones keyboard settings after installing your apk.


  1. 设置>语言和键盘

  2. 选择您的键盘(可能取消选中默认的Andr​​oid键盘以及)

这篇关于调用自定义Android键盘在我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆