title: Android Listview on top of Keyboardview
body: <p>Hi I implemented a SearchView which shows results in a ListView.The problem I am facing is that I have a custom keyboard and my Listview is overlapping over the keyboardView so I am not able to press some of the keys on my keyboard.What I want to achieve is my Listview to be displayed under the KeyboardView.Here is my layout file </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/basic_bg" &gt;
  
  &lt;android.inputmethodservice.KeyboardView
      android:id="@+id/keyboardView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:focusable="true"
      android:focusableInTouchMode="true"
      android:visibility="gone" /&gt;
  
  
  
  &lt;SearchView
      android:id="@+id/searchView"
      android:layout_width="400dp"
      android:layout_height="40dp"
      android:layout_alignParentTop="true"
      android:layout_alignRight="@+id/textView3"
      android:layout_marginLeft="49dp"
      android:layout_marginTop="25dp"
      android:layout_toRightOf="@+id/imageViewUp"
      android:background="@drawable/delete_bg_5line"
      android:ems="10"
      android:hint="Destination Input Text"
      android:textColor="#87CEFA" &gt;
  &lt;/SearchView&gt;
  
  &lt;ListView
      android:id="@+id/main_list_View"
      android:layout_width="450dp"
      android:layout_height="235dp"
      android:layout_alignLeft="@+id/searchView"
      android:layout_below="@+id/searchView"
      android:listSelector="@android:color/transparent"
      android:scrollbars="none" &gt;
  &lt;/ListView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><b>Also I want to hide the custom keyboard when the user browses through the ListView</b>
  <b>and code for changing the visibility of keyboard</b></p>
  
  <pre><code>searchtextView.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method st4ub
              toggleKeyboardVisibility(searchtextView);
  
          }
  
          private void toggleKeyboardVisibility(
                  AutoCompleteTextView searchViewWidget) {
              KeyboardView keyboardView = (KeyboardView) findViewById(R.id.keyboardView);
              int visibility = keyboardView.getVisibility();
              switch (visibility) {
              case View.VISIBLE:
                  keyboardView.setVisibility(View.GONE);
                  break;
              case View.GONE:
              case View.INVISIBLE:
                  keyboardView.setVisibility(View.VISIBLE);
                  searchtextView = searchViewWidget;
                  break;
              }
          }
  
      });
  </code></pre>
  
  <p>Another thing I want to do is <b>change the background for my keyboard keys</b>.I was not able to do this I tried adding android:keyIcon attribute to each of the keys but it did not work and only the preview background image changes when I use this attribute.How do I go about doing this.</p>
  
  <pre><code>&lt;Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
  android:horizontalGap="0px"
  android:keyBackground="@drawable/custom_keyboard_press_onekey"
  android:keyWidth="10%p"
  android:verticalGap="0px" &gt;
  
  &lt;Row&gt;
  
      &lt;Key
          android:codes="1"
          android:iconPreview="@drawable/custom_keyboard_press_onekey"
          android:isRepeatable="true"
          android:keyEdgeFlags="left"
          android:keyIcon="@drawable/custom_keyboard_press_onekey"
          android:keyLabel="1" /&gt;
   &lt;/Row&gt;
  &lt;/Keyboard&gt;
  </code></pre>
  
  <p>And this is how I instantiate the keyboard</p>
  
  <pre><code>    final KeyboardView keyboardView = (KeyboardView) findViewById(R.id.keyboardView);
      Keyboard keyboard = new Keyboard(this, R.layout.keyboard);
      keyboardView.setKeyboard(keyboard);
      keyboardView.setEnabled(true);
      keyboardView.setPreviewEnabled(true);
  
      keyboardView.setOnKeyboardActionListener(this);
  </code></pre>
  
  <p>Can someone please guide me where I am going wrong or suggest how I should proceed.Thanks for the help.</p>