title: How to set keyboard background in Android
body: <p>This might sound stupid, but I'm seriously a newbie at Android programming.
  I have looked this up on the Internet, but it looks like nobody ever had difficulties with this. 
  I am making a soft keyboard for our school Android project.
  I intended to make my own background for this keyboard, but I couldn't figure out how to change the keyboard's background.
  I made a buttonbgselector.xml file in my drawable dir:</p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;item
  android:drawable="@drawable/button" /&gt;
  &lt;item
  android:state_pressed="true"
  android:drawable="@drawable/buttonpressed" /&gt;
  &lt;item
  android:state_checkable="true"
  android:drawable="@drawable/button" /&gt;
  &lt;item
  android:state_checkable="true"
  android:state_pressed="true"
  android:drawable="@drawable/buttonpressed" /&gt;
  &lt;item
  android:state_checkable="true"
  android:state_checked="true"
  android:drawable="@drawable/button" /&gt;
  &lt;item
  android:state_checkable="true"
  android:state_checked="true"
  android:state_pressed="true"
  android:drawable="@drawable/buttonpressed" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>I tried setting the background here:</p>
  
  <pre><code>@Override public View onCreateInputView() {
      mInputView = (KeyboardView) getLayoutInflater().inflate(
              R.layout.input, null);
      mInputView.setBackgroundResource(R.drawable.buttonbgselector);
      mInputView.setOnKeyboardActionListener(this);
      mInputView.setKeyboard(mQwertyKeyboard);
      return mInputView;
  }
  </code></pre>
  
  <p>And the keys are still the same, nothing changed.</p>