3
我已经基于Google为我创建的应用程序提供的示例键盘创建了自己的键盘。如何在我的应用程序中使用此键盘而不是EditText
输入的默认键盘?我需要能够隐藏默认键盘并改为使用我的。如何使用我自己的键盘而不是默认的?
我已经基于Google为我创建的应用程序提供的示例键盘创建了自己的键盘。如何在我的应用程序中使用此键盘而不是EditText
输入的默认键盘?我需要能够隐藏默认键盘并改为使用我的。如何使用我自己的键盘而不是默认的?
您可以创建自己的类,它扩展的EditText和覆盖onCheckIsTextEditor():
public class CustomEditText extends EditText
{
public CustomEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onCheckIsTextEditor()
{
// Your code to use your own input method here.
}
}
在该活动清单文件u必须申报隐藏softkeyboard标签 – mainu