Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use search from menu item. Go to code below Use this</p> <pre><code>EditText search; public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) { LayoutInflater inflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); RelativeLayout rl =(RelativeLayout)inflater.inflate(R.layout.search_text, null); search=(EditText)rl.getChildAt(0); search.addTextChangedListener(filterTextWatcher); menu.add(0, 1, 1, R.string.inlineSearch).setIcon(R.drawable.action_search).setActionView(rl).setShowAsA ction(MenuItem.S HOW_AS_ACTION_ALWAYS); return super.onCreateOptionsMenu(menu); } private TextWatcher filterTextWatcher = new TextWatcher() { public void afterTextChanged(Editable s) { Log.e("TextWatcher","after"); } public void beforeTextChanged(CharSequence s, int start, int count, int after) { Log.e("TextWatcher","before"); } public void onTextChanged(CharSequence s, int start, int before, int count) { Log.e("TextWatcher","onText"); } }; </code></pre> <p>and layout for search is :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="fill_horizontal" &gt; &lt;EditText android:id="@+id/search_text" style="@style/EditTextHoloDark" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="4dip" android:imeActionId="1337" android:imeOptions="actionDone" android:inputType="textCapCharacters|textNoSuggestions" android:singleLine="true" android:hint="Search" android:textStyle="bold" android:drawableLeft="@drawable/action_search" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Let me know is it helpful or not.?</p>
    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.
    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