相关疑难解决方法(0)

自定义<Key>的外观

某些第三方键盘在每个键上都有多个字符,例如,Better Keyboard 8在每个键上的字母上方都有数字和标点符号:

更好的键盘屏幕截图

这可以用<Key>标签完成吗?如果是这样,我无法弄清楚如何.如果有人知道如何,我将不胜感激.

先谢谢你,巴里

android android-widget android-layout

10
推荐指数
1
解决办法
7664
查看次数

如何更改android软键盘键的背景颜色?

我正在Android上实现自定义键盘.我刚刚阅读了"developer.android.com"的文档,并看到了使用软键盘的示例.我只能 - 它改变键盘背景,改变按钮的位置,将keyIcon而不是keyLabel设置为键.

但我仍然无法改变关键的背景和颜色.

请写一些XML或源代码示例代码.谢谢!

我改变背景的示例:

    public class GBInput extends InputMethodService implements KeyboardView.OnKeyboardActionListener{
    ...
    private GBKeyboardView mInputView;
    @Override
        public View onCreateInputView() {
            mInputView = (GBKeyboardView) getLayoutInflater().inflate(R.layout.input, null);
            mInputView.setOnKeyboardActionListener(this);
            mInputView.setKeyboard(mQwertyKeyboard);
            mInputView.setBackgroundResource(R.color.keyboard_background);
            return mInputView;
        }
    ...
    }
Run Code Online (Sandbox Code Playgroud)

我需要这样的东西: 在此输入图像描述

所有按钮的图像 - 它的坏主意,所以我想找到更好的问题.

keyboard android android-softkeyboard

8
推荐指数
1
解决办法
2万
查看次数

如何在自定义键盘Android中动态更改键的背景颜色或主题

我正在使用自定义键盘应用程序我需要设置或更改键盘的背景主题或颜色.在我的应用程序中,我们可以选择不同的背景主题和不同颜色的键行.在第一次启动应用程序时它工作正常,但下次自定义键盘显示主题时不会更改.

我正在使用此代码:

public class SoftKeyboard extends InputMethodService 
    implements KeyboardView.OnKeyboardActionListener {
static final boolean DEBUG = false;

/**
 * This boolean indicates the optional example code for performing
 * processing of hard keys in addition to regular text generation
 * from on-screen interaction.  It would be used for input methods that
 * perform language translations (such as converting text entered on 
 * a QWERTY keyboard to Chinese), but may not be used for input methods
 * that are primarily intended to …
Run Code Online (Sandbox Code Playgroud)

android android-softkeyboard

3
推荐指数
1
解决办法
6637
查看次数