title: Null pointer exception before TextChanged in android
body: <p>It's giving me null pointer exception i have initialized added textwatcher but still i am having this exception. Am I forgetting some thing.<br>
  Any Help is Appreciated.   </p>
  
  <pre><code>    EditText editText = (EditText) dialogList.findViewById(R.id.search);
  editText.addTextChangedListener(mSearchTw);
  
  mSearchTw = new TextWatcher() {
  
      @Override
      public void onTextChanged(CharSequence s, int start, int before, int count) {
  
      }
      @Override
      public void beforeTextChanged(CharSequence s, int start, int count,int after) {
          pokeAdapter.getFilter().filter(s);
      }
  
      @Override
      public void afterTextChanged(Editable s) {
      }
  };
  </code></pre>