Ali
Ali

Reputation: 1678

onSearchRequested() not working after renaming Package

I've renamed my android app package via Android Tools -> Rename Application Package, but after renaming it I'm unable to see the search box when invoking onSearchRequested() which works fine if i change the package name back to its original value, is there something else that's needed to be changed?

[edit]

Following is the class that is responsible for invoking onSearchRequested():

public class SearchAction implements Action {

    Activity _activity;

    public SearchAction(Activity activity){

        _activity = activity;

    }

    public int getDrawable() {

        return R.drawable.ic_action_menu;

    }

    public void performAction(View view) {

        _activity.onSearchRequested();

    }

}

Upvotes: 1

Views: 684

Answers (1)

Wolfram Rittmeyer
Wolfram Rittmeyer

Reputation: 2402

I guess you use a fully qualified naming scheme in your AndroidManifest.xml. You have to change the package name there as well.

For these elements:

   <meta-data
       android:name="android.app.default_searchable"
       android:value="your.package.YourSearchActivity" />

Upvotes: 3

Related Questions