0

I want to add search functionally in my activity so i tried to implement SearchView.OnQueryTextListener but it's showing error that create interface......

any other way to add search in action bar..please link me...

public class setting_1 extends Fragment implements SearchView.OnQueryTextListener{
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.setting_1, container, false);
    ImageView i1 = (ImageView) rootView.findViewById(R.id.s_i_1_1);

    return rootView;
}

}

bhavdip
  • 189
  • 5
  • 20

1 Answers1

0

First:

import android.widget.SearchView;

Then implement your SearchView.OnQueryTextListener.

hungndv
  • 2,121
  • 2
  • 19
  • 20