title: Search Functionality to ListView flags - Cannot resolve method 'getFilter()
body: <p>I have been trying to implement a simple search to a listView which i have been able to populate using Volley but all to no avail  till date.
  It keeps flagging this <strong>Cannot resolve method 'getFilter()</strong></p>
  
  <p>I have also tried other peoples question which relates to this same search issue but none seems to work for me so i had no choice than to post mine here.
  Below is my Code</p>
  
  <pre><code>public class MainActivity extends Activity {
  
     private ListView mList;
     private List&lt;Movie&gt; movieList = new ArrayList&lt;Movie&gt;();
     EditText inputSearch;
  
  
      protected void onCreate(Bundle savedInstanceState) {
             super.onCreate(savedInstanceState);
             requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
             setContentView(R.layout.activity_main);
  
         mList = (ListView) findViewById(R.id.list);
         inputSearch = (EditText) findViewById(R.id.inputSearch);
  
  
             adapter = new CustomListAdapter(this, movieList);
             mList.setAdapter(adapter);
  
               fetchMovie(); 
               // A method i declared in the program to load data from server with  volley library which works fine
  
          //SEARCH TEXTCHANGE
          inputSearch.addTextChangedListener(new TextWatcher() {
  
               @Override
               public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {
                     // When user changed the Text
                    MainActivity.this.adapter.getFilter().filter(cs);
                  //FLAGS Cannot resolve method 'getFilter()' here
                  }
  
               @Override
               public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,
                                        int arg3) {
                    // TODO Auto-generated method stub
  
               }
  
               @Override
               public void afterTextChanged(Editable arg0) {
                   // TODO Auto-generated method stub
               }
            });
  
  
  
  
      }
  
  
  
  }
  </code></pre>
  
  <p>Here is the CustomListAdapter code which populates my listView well</p>
  
  <pre><code>public class CustomListAdapter extends BaseAdapter {
  
          private Activity activity;
       private LayoutInflater inflater;
       private List&lt;Movie&gt; movieItems;
          private String[] bgColors;
          ImageLoader imageLoader = MyApplication.getInstance().getImageLoader();
  
  
           public CustomListAdapter(Activity activity, List&lt;Movie&gt; movieItems) {
               this.activity = activity;
               this.movieItems = movieItems;
               bgColors = activity.getApplicationContext().getResources().getStringArray(R.array.movie_serial_bg);
           }
           @Override
           public int getCount() {
                  return movieItems.size();
           }
  
           @Override
          public Object getItem(int location) {
               return movieItems.get(location);
           }
  
              @Override
              public long getItemId(int position) {
                 return position;
              }
  
           @Override
           public View getView(int position, View convertView, ViewGroup parent) {
  
              if (inflater == null)
                inflater = (LayoutInflater) activity
                   .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
               if (convertView == null)
                  convertView = inflater.inflate(R.layout.list_row_image, null);
  
               if (imageLoader == null)
                imageLoader = MyApplication.getInstance().getImageLoader();
              NetworkImageView thumbNail = (NetworkImageView) convertView.findViewById(R.id.thumbnail);
  
               TextView serial = (TextView) convertView.findViewById(R.id.serial);
              TextView title = (TextView) convertView.findViewById(R.id.title);
              TextView rating = (TextView) convertView.findViewById(R.id.rating);
              TextView genre = (TextView) convertView.findViewById(R.id.genre);
              TextView year = (TextView) convertView.findViewById(R.id.releaseYear);
  
              // getting movie data for the row
              Movie m = movieItems.get(position);
  
              // thumbnail image
              thumbNail.setImageUrl(m.getThumbnailUrl(), imageLoader);
  
              // title
              title.setText(m.getTitle());
  
              // rating
               rating.setText("Rating: " + String.valueOf(m.getRating()));
  
              // genre
              String genreStr = "";
              for (String str : m.getGenre()) {
                genreStr += str + ", ";
                }
              genreStr = genreStr.length() &gt; 0 ? genreStr.substring(0,
                   genreStr.length() - 2) : genreStr;
               genre.setText(genreStr);
  
              // release year
               year.setText(String.valueOf(m.getYear()));
  
               String color = bgColors[position % bgColors.length];
              serial.setBackgroundColor(Color.parseColor(color));
  
  
  
  
              return convertView;
       }
  }
  </code></pre>
  
  <p>Would appreciate any one who can assist me on what exactly i am not doing right as this little issue has been frustrating my whole project for days now.</p>
  
  <p>Thanks in advance!</p>