title: MultiAutoCompleteTextView Custom adapter but i m not able to avoid dropdown dismiss
body: <p><code>MultiAutoCompleteTextView</code> Custom adapter, How to <code>dismissDropDown</code> 
  my code click listener is not working.</p>
  
  <p><a href="http://i.stack.imgur.com/pSq7F.png" rel="nofollow">output image</a></p>
  
  <p>Fragment </p>
  
  <pre><code>public class ShareDialogFragment extends DialogFragment implements View.OnClickListener{
  Dialog dialog;
  private static final String ARG_PARAM1 = "param1";
  private static final String ARG_PARAM2 = "param2";
  private String mParam1;
  private String mParam2;
  String articleID;
  MultiAutoCompleteTextView myMultiAutoCompleteTextView;
  TextView Cancel, share;
  Context context;
  public static ShareDialogFragment fragment;
  OnClickListenerCustom onClickListenerCustom;
  private PrefManager pref;
  ArrayList&lt;ShareWithArticle&gt; userList = new ArrayList&lt;&gt;();
  
  MultiAutoCompleteAdapter adapter;
  RequestParse requestParse;
  public ShareDialogFragment() {
  
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      if (getArguments() != null) {
          mParam1 = getArguments().getString(ARG_PARAM1);
          mParam2 = getArguments().getString(ARG_PARAM2);
      }
      setStyle(DialogFragment.STYLE_NO_TITLE, R.style.alert_dialog);
      Bundle arg = getArguments();
      if(arg!=null){
          articleID = getArguments().getString("ArticleId");
      }
      dialog = new Dialog(getActivity());
      requestParse = new RequestParse();
      UserNameTo();
  
  
  }
  @Override
  public void onAttach(Activity activity){
      super.onAttach(activity);
      context = activity;
  
  }
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View view =inflater.inflate(R.layout.fragment_share_dialog, container, false);
      Cancel = (TextView)view.findViewById(R.id.Cancel);
      Cancel.setOnClickListener(this);
      share = (TextView) view.findViewById(R.id.textView22);
      myMultiAutoCompleteTextView = (MultiAutoCompleteTextView)view.findViewById(R.id.editText);
  
      //ShareWithArticle s = (ShareWithArticle) myMultiAutoCompleteTextView.getAdapter().getItem(position);
  
  
  
      return view;
  }
  public void UserNameTo(){
      requestParse.postJson(ConfigApi.UserToArticle(), new RequestParse.VolleyCallBackPost() {
          @Override
          public void onSuccess(String result) {
              userList = ShareArticleuserNameTo.parseResponse(result);
  
              adapter = new MultiAutoCompleteAdapter(context,R.layout.custom_dropdown, userList);
              myMultiAutoCompleteTextView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
              myMultiAutoCompleteTextView.setAdapter(adapter);
              myMultiAutoCompleteTextView.dismissDropDown();
  
  
          }
          @Override
          public void onRequestError(String errorMessage) {
              M.i("============errorMessage", errorMessage);
          }
          @Override
          public Map OnParam(Map&lt;String, String&gt; params) {
              return null;
          }
      });
  
  }
  
  @Override
  public void onClick(View v) {
      switch (v.getId()){
          case R.id.Cancel:
              getDialog().dismiss();
              break;
      }
  }
  }
  </code></pre>
  
  <p>and My Custom Adapter <code>MultiAutoCompleteTextView</code> Code:</p>
  
  <pre><code>public class MultiAutoCompleteAdapter extends ArrayAdapter&lt;ShareWithArticle&gt; {
  //ShareWithArticle
  private final Context mContext;
  private final List&lt;ShareWithArticle&gt; mDepartments;
  private final List&lt;ShareWithArticle&gt; mDepartments_All;
  private final List&lt;ShareWithArticle&gt; mDepartments_Suggestion;
  private final int mLayoutResourceId;
  private ImageLoader imageLoader;
  private RequestQueue requestQueue;
  private VolleySingleton volleySingleton;
  public MultiAutoCompleteAdapter(Context context, int resource, List&lt;ShareWithArticle&gt; departments) {
      super(context, resource, departments);
      this.mContext = context;
      this.mLayoutResourceId = resource;
      this.mDepartments = new ArrayList&lt;&gt;(departments);
      this.mDepartments_All = new ArrayList&lt;&gt;(departments);
      this.mDepartments_Suggestion = new ArrayList&lt;&gt;();
  }
  
  public int getCount() {
      return mDepartments.size();
  }
  
  public ShareWithArticle getItem(int position) {
      return mDepartments.get(position);
  }
  
  public long getItemId(int position) {
      return position;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      try {
          if (convertView == null) {
              LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
              convertView = inflater.inflate(mLayoutResourceId, parent, false);
          }
          ShareWithArticle department = getItem(position);
          TextView name = (TextView) convertView.findViewById(R.id.name);
          ImageView userProfile = (ImageView) convertView.findViewById(R.id.profileImages);
          name.setText(department.getUsrFNm() + " " + department.getUsrLNm());
  
  
          volleySingleton = VolleySingleton.getInstance();
          imageLoader = volleySingleton.getImageLoader();
          requestQueue = volleySingleton.getRequestQueue();
          String UsrPrf = department.getUsrPicture();
          RequestParse.loadImages(UsrPrf, userProfile);
  
      } catch (Exception e) {
          e.printStackTrace();
      }
      return convertView;
  }
  
  /*@Override
  public boolean isEnabled(int position) {
      return position % 2 == 0 ? false : true;
  }*/
  
  @Override
  public Filter getFilter() {
      return new Filter() {
          @Override
          public String convertResultToString(Object resultValue) {
              return ((ShareWithArticle) resultValue).getUsrFNm()+ " " + ((ShareWithArticle) resultValue).getUsrLNm();
          }
  
          @Override
          protected FilterResults performFiltering(CharSequence constraint) {
              if (constraint != null) {
                  mDepartments_Suggestion.clear();
                  for (ShareWithArticle department : mDepartments_All) {
                      if (department.getUsrFNm().toLowerCase().startsWith(constraint.toString().toLowerCase())) {
                          mDepartments_Suggestion.add(department);
                      }
                  }
                  FilterResults filterResults = new FilterResults();
                  filterResults.values = mDepartments_Suggestion;
                  filterResults.count = mDepartments_Suggestion.size();
                  return filterResults;
              } else {
                  return new FilterResults();
              }
          }
  
          @Override
          protected void publishResults(CharSequence constraint, FilterResults results) {
              mDepartments.clear();
              if (results != null &amp;&amp; results.count &gt; 0) {
                  // avoids unchecked cast warning when using mDepartments.addAll((ArrayList&lt;Department&gt;) results.values);
                  List&lt;?&gt; result = (List&lt;?&gt;) results.values;
                  for (Object object : result) {
                      if (object instanceof ShareWithArticle) {
                          mDepartments.add((ShareWithArticle) object);
                      }
                  }
              } else if (constraint == null) {
                  // no filter, add entire original list back in
                  mDepartments.addAll(mDepartments_All);
              }
              notifyDataSetChanged();
          }
      };
  }
  }
  </code></pre>