0

I am using the Serach Widget in the action bar with the following menu.xml file.

<item
    android:id="@+id/menu_search_widget"
    android:actionViewClass="android.widget.SearchView"
    android:icon="@android:drawable/ic_menu_search"
    android:showAsAction="ifRoom"
    android:title="Search"/>
<item
    android:id="@+id/menu_help"
    android:icon="@android:drawable/ic_menu_help"
    android:orderInCategory="100"
    android:showAsAction="never"
    android:title="Help"/>
</menu>

When running in landscape mode, if the user select search then a full screen search widget is shown. How can I change it so the soft keyboard only fills the bottom half of the screen and the text keyed is shown directly within the search "textbox" on the actionbar?

To add a bit more info, I have added a few screenshots.

enter image description here

When text is entered in the search area the soft keyboard is presented, like this

enter image description here

What I am trying to get is something like this (from the Chrome Browser) i.e. where the keyboard only takes half of the screen and the text is entered directly in the search control.

enter image description here

BENBUN Coder
  • 4,801
  • 7
  • 52
  • 89
  • Doesn't the way the soft keyboard appears depend on phone, keyboard used, etc.? I'm not sure if that's something you can control. – Szymon Sep 22 '13 at 23:03
  • I've added some screenshots, that show different keyboard sizes on the same device. – BENBUN Coder Sep 23 '13 at 20:48

2 Answers2

0

I think this depends on the device and keyboard. On my Galaxy S3, it shows up ok when I'm using the Samsung built-in keyboard but when I'm using Japanese Google keyboard, it takes the whole screen.

Szymon
  • 42,577
  • 16
  • 96
  • 114
0

Keyboard size varies with devices. If you want design customize keyboard you follow the below link http://developer.android.com/reference/android/inputmethodservice/Keyboard.html.