gpt4 book ai didi

android - 如何将常用电子邮件域(gmail/yahoo/hotmail)的快捷方式添加到 android 电视键盘?

转载 作者:行者123 更新时间:2023-11-30 00:38:39 24 4
gpt4 key购买 nike

我正在尝试改善用户在我的应用中输入电子邮件地址的用户体验。知道如何将常用电子邮件域添加为键盘快捷键吗?

请查看我附加的其他应用程序的键盘以供引用。我正在尝试找到用 gmail/yahoo/hotmail 域填充我的键盘的方法(就像在图片中一样)。

enter image description here

最佳答案

尝试检查 Creating an Input Method docs,因为它讨论了输入法编辑器 (IME),它是一个允许用户输入文本的用户控件。

If you haven't worked with IMEs before, you should read the introductory article Onscreen Input Methods first. Also, the SoftKeyboard sample app included in the SDK contains sample code that you can modify to start building your own IME.

Designing the Input Method UI

There are two main visual elements for an IME: the input view and the candidates view. You only have to implement the elements that are relevant to the input method you're designing.

Input view

The input view is the UI where the user inputs text in the form of keyclicks, handwriting or gestures. When the IME is displayed for the first time, the system calls the onCreateInputView() callback. In your implementation of this method, you create the layout you want to display in the IME window and return the layout to the system. This snippet is an example of implementing the onCreateInputView() method:

  @Override
public View onCreateInputView() {
MyKeyboardView inputView =
(MyKeyboardView) getLayoutInflater().inflate( R.layout.input, null);

inputView.setOnKeyboardActionListener(this);
inputView.setKeyboard(mLatinKeyboard);

return mInputView;
}

In this example, MyKeyboardView is an instance of a custom implementation of KeyboardView that renders a Keyboard. If you’re building a traditional QWERTY keyboard, see the KeyboardView class.

关于android - 如何将常用电子邮件域(gmail/yahoo/hotmail)的快捷方式添加到 android 电视键盘?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42940510/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com