I'm creating an object from the android Keyboard class (https://developer.android.com/reference/android/inputmethodservice/Keyboard.html). In my case I just need the default keyboard, no custom keyboard. But the constructors of the Keyboard class requires a xml resource file that contains a definition of rows and keys. It seems it's only for creating a custom keyboard.
I need that object of the Keyboard class to use it in a KeyboardView within a TabLayout:
keyboard123 = (KeyboardView) Tab2View.findViewById(R.id.keyboard123);
Keyboard k1 = new Keyboard(Tab2View.getContext(), R.xml.qwerty_keyboard);
k1 = new Keyboard(Tab2View.getContext(), com.android.internal.R.id.keyboardView);
keyboard123.setKeyboard(k1);
The code above works great, but only if I create an xml file "qwerty_keyboard" with key definition. Is there a way to just get the android default keyboard and display it in one of the tabs in the TabLyout?