有没有办法在Android中的KeyboardView中使用GridLayout和一些图片?我试图在xml中编写它,但它给了我错误,我无法在KeyboardView中使用该元素。
答案 0 :(得分:2)
为什么你当时使用KeyboardView
?
创建InputMethodService
并在onCreateInputView()
中,返回您要显示的任何布局。
@Override
public View onCreateInputView() {
final View root = getLayoutInflater().inflate(R.layout.keyboard_layout, null);
//set all the click listeners for your views
return root;
}