Find arrayAdapter

Asked

Viewed 52 times

1

  public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.menu_search, menu);
    MenuItem item = menu.findItem(R.id.menuSearch);
    SearchView searchView = (SearchView)item.getActionView();

    searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
        @Override
        public boolean onQueryTextSubmit(String query) {
            return false;
        }

        @Override
        public boolean onQueryTextChange(String newText) {
            Error -> listViewAdapter <- Error.getFilter().filter(newText);

            return false;
        }
    });

    return super.onCreateOptionsMenu(menu);
}

I want to make like a findview but with the arrayadapter that is in the class of my Fragment, and the find taria na mainActivity, I want to do whatever to try to find the listViewAdapter that is the name of my Arrayadapter that is in Fragment, no longer found in Mainactivity.

  • 3

    What’s the doubt? Simply playing code and hoping someone will guess is not a good way to get an answer. Edit the question explaining your doubt,

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.