问题标签 [android-input-method]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Reading input of hardware keyboard within application
I want to know if there is any provision that allows me to read the input key from a hardware keyboard present on the phone or connected externally in android . I basically am building an application that needs to have special shortcuts set . I researched about the WindowManagerPolicy but eclipse does not seem to support any interface of that sort . I need help even starting .
Thank you
android - Android输入法中保存键盘状态
我正在写一个InputMethodService
,基本上只是一个软键盘,我从它开始另一个活动:
但是当我这样做时,用户将处于打字过程中。例如,用户按下'a'
键开始新的活动。有没有办法,当用户完成新活动时,我可以让他们恢复打字并将键盘恢复原状?
android - 接到来电时如何调用活动。
大家好,我想在默认的来电活动上调用我自己的活动。我已经使用广播接收器完成了这项工作,我在接到来电时调用了我的活动。但是从我第二次接到来电时它第一次工作正常,然后默认的来电活动正在通过我的活动。我不知道是什么问题,任何人都可以帮助我..
显现:
Java 代码:
android - Developing InputMethod For Burmese :: Android
I am developing Burmese Input Method for android 4.0. I am following the sample soft keyboard provided in API Demos.
Now My question is
In qwert.xml of sample soft keyboard.I got the following.
In above snippet android:codes="113"
113 is UTF-8 code for character q.
What I did is I replaced the android:codes with UTF-8 code for Burmese Characters. I was expecting that burmese character will be displayed but it displayes blank space for all the characters.
I am stucked up.Googled but nothing found.
Can any one help me?
android - 如何避免输入法隐藏 WebView 底部的 EditText 和 Button
WebView
我通过在我的应用程序中使用来加载网页,页面底部有EditText
和。Button
当我按下 时EditText
,会显示软输入法,但输入法隐藏了EditText
and Button
。
我想要EditText
andButton
移动到输入法的顶部,所以输入法不会隐藏它们。
我在android:windowSoftInputMode="adjustPan"
我的活动标签中添加了AndroidManifest.xml
,但它不起作用。
我还可以做些什么?
android - 基于 Webapp 的 Android 键盘
我正在编写一个 Android 键盘。现在我到了必须重写 KeyboardView 的地步,我问自己为什么不切换到 Web 应用程序而不是原生 Android 应用程序。因此,我以后可以轻松地将应用程序部署到其他平台而无需重写。
我的方法是将 Android 应用程序用作我的网络应用程序的容器,可能与 GWT 结合使用。我也在考虑使用PhoneGap。
问题是,到目前为止,我还没有发现任何关于人们使用 webapps 作为 InputMethod 的信息。现在我想知道将 webapps 用于此任务是否合理甚至可能,或者它们是否仅适用于正常活动。
有没有人尝试过这样做或一些提示为什么或为什么不这样做?
android - 以编程方式从自定义 android 键盘更改键盘
我创建了一个 android 自定义键盘。按下一个按钮后,我希望它把键盘改回以前的键盘,大概是使用InputMethodManager.setInputMethod(IBinder token, String id);
但是,我不知道从哪里获取令牌 - usinggetCurrentInputBinding().getConnectionToken()
不起作用。
有谁知道在哪里可以找到令牌?
谢谢,
埃德
java - Android - 获取键盘按键
我想抓住按下软键盘的任何键。我不想在我的 Activity 中使用 EditView 或 TextView,该事件必须从我的 Activity 内的扩展视图中处理。
我刚试过这个:
1)覆盖onKeyUp(int keyCode, KeyEvent event)
活动方法。这不适用于软键盘,它只会捕获几个硬键盘。
2)创建我的OnKeyListener
并在我的视图中注册它,其中包含一个已注册和正在工作的OnTouchListener
. 这对软键盘根本不起作用。
3) 覆盖onKeyUp(int keyCode, KeyEvent event)
View 方法。如果我设置我的 OnKeyListener 或不设置它,这根本不起作用。
4) 使用InputMethodManager
对象调用方法showSoftInput
并将其传递给我的视图。这对抬起键盘也不起作用,确实我必须打电话toggleSoftInput
;也没有赶上关键事件。
我只在模拟器中测试了所有内容,但我认为这已经足够了。为什么从键盘获取一个简单的按键事件如此复杂?
android - 设置输入法
我正在查看 InputMethodManager 类的 setInputMethod 函数,我看到它接收 2 个参数:令牌和输入法的 ID。我可以从 InputMethodInfo 类中获取 ID,但我不知道从哪里获取令牌。我可以从视图中获取的不是窗口令牌,而是另一种令牌,我该如何获取呢?谢谢。