Skip to content

Instantly share code, notes, and snippets.

View afrinjamanbd's full-sized avatar
🔆
Google Summer of Code Winner 2019

Afrin Jaman afrinjamanbd

🔆
Google Summer of Code Winner 2019
View GitHub Profile
@vxhviet
vxhviet / newActivityFromSearchView.md
Last active March 19, 2021 10:21
Start new activity from SearchView

Source: StackOverflow

This answer is a little late but I feel it'll be useful for future viewers. The dilemma seems to come from the ambiguity of the Android SearchView tutorial. The scenario they cover assumes you will be displaying the results in the same Activity the SearchView resides. In such a scenario, the Activity tag in the AndroidManifest.xml file would look something like this:

<activity
    android:name=".MainActivity"
    android:label="@string/main_activity_label"
    android:launchMode="singleTop">
        <intent-filter>