-1

I want to use standard search feature in android but dont want two different activities. I have an activity which is my landing activity of the app as well and I want to call onSearchRequested() and return results to the same activity.

here is my manifest code -

<activity
            android:name=".TaskManagerActivity"
            android:label="@string/title_activity_task_manager" 
            android:noHistory="false"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

        </activity>

already have details in another question..didnt get any response.

questions/14445966/activity-not-getting-populated-on-search-in-same-activity

Any help plz..!! Thanks

RayKaushik
  • 301
  • 5
  • 17

1 Answers1

0

Very easy to do. See http://developer.android.com/guide/topics/search/index.html. You can set up a SearchView as an action view inside your menu. The most simple implementation will get search text. You can add to its functionality if you want.

Search is a very powerful part of the Android system, which of course makes sense for an OS coming from a search company! For that reason, you should try to use Android's search functionality rather than trying to "roll your own". You'll get an interface and functionality that's expected by users.

Joe Malin
  • 8,621
  • 1
  • 23
  • 18
  • i tried implementing same details oh which are here - questions/14445966/activity-not-getting-populated-on-search-in-same-activity can u plz have a look..i can nt figure out the issue..thnx – RayKaushik Jan 23 '13 at 04:16