Note that there are some explanatory texts on larger screens.

plurals
  1. POi want to implement searchbar concept in my app
    primarykey
    data
    text
    <p>i want to implement searcb bar concept in my app . when ever user clicks on searbar the keyboard buttons need to display with default searchable button in it ..i followed few of the links ...but unable to get the searchable bar nor the keyboard populated buttons ...</p> <p>please help me thanks in advance .</p> <p>this is my searchable.xml placed res/xml</p> <pre><code>&lt;searchable android:label="@string/app_label" android:hint="@string/search_hint" &gt; &lt;/searchable&gt; </code></pre> <p>and this is my manifest file </p> <p> </p> <pre><code>&lt;uses-sdk android:minSdkVersion="8" /&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" &gt; &lt;activity android:name=".SearchboxActivity" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.SEARCH" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;meta-data android:name="android.app.searchable" android:resource="@xml/searchable"/&gt; &lt;/activity&gt; &lt;/application&gt; </code></pre> <p></p> <p>here is the activity ... package com.hands;</p> <p>import android.app.Activity; import android.app.SearchManager; import android.content.Intent; import android.os.Bundle;</p> <p>public class SearchboxActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);</p> <pre><code> // Get the intent, verify the action and get the query Intent intent = getIntent(); if (Intent.ACTION_SEARCH.equals(intent.getAction())) { String query = intent.getStringExtra(SearchManager.QUERY); // doMySearch(query); } } private void doMySearch(String query) { // TODO Auto-generated method stub System.out.println("hello 2"); } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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