Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use any View/ViewGroup as a keyboard layout, Infact you can even set the keyboard layout to a view which is not an instance of keyboardview or one of its extended class. You have not shared your RelativeLayout but i think The exception may be because of some problem with your RelativeLayout. </p> <p>You can put a button to the right of Keyboard like this(res/layout/input.xml): </p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyboardLayout" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent" &gt; &lt;android.inputmethodservice.KeyboardView android:id="@+id/keyboardView" android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; &lt;ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="@drawable/ic_launcher"/&gt; </code></pre> <p></p> <p>And then return an instance of this layout from <strong>OnCreateInputView</strong>. </p> <p>Update: The statement mInputView = (KeyboardView) getLayoutInflater().inflate( R.layout.input, null); in your below comment will throw ClassCastException as the inflated view is not an instance of KeyboardView. you need to change it like this: </p> <pre><code> public View onCreateInputView() { mInputView = (View)getLayoutInflater().inflate( R.layout.input, null); mKeyboardView = (KeyboardView)mInputView.findViewById(R.id.keyboardView); mKeyboardView.setOnKeyboardActionListener(this); mKeyboardView.setKeyboard(mQwertyKeyboard); return mInputView; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload