title: How to add a custom adapter to an AutoCompleteTextView
body: <p>Is there any simple way to set a 2 TextView dropdown to an AutoCompleteTextView.</p>
  
  <p>There is <code>android.R.layout.two_line_list_item</code> Which I couldn't find any examples how to use.</p>
  
  <p><strong>So, I tried this:</strong></p>
  
  <pre><code>public class TwoLineDropdownAdapter extends BaseAdapter {
  
      private LayoutInflater mInflater = null;
      private Activity activity;
      public ArrayList&lt;TwoLineDropDown&gt; values = new ArrayList&lt;TwoLineDropDown&gt;();
  
      public TwoLineDropdownAdapter(Activity a, ArrayList&lt;TwoLineDropDown&gt; items) {
  
          values = items;
          activity = a;
          mInflater = (LayoutInflater) activity
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      }
  
      public int getCount() {
  
          return values.size();
      }
  
      public TwoLineDropDown getItem(int position) {
  
          return values.get(position);
      }
  
      public long getItemId(int position) {
  
          return position;
      }
  
      public static class ViewHolder {
  
          public TextView title;
          public TextView description;
      }
  
      public View getView(final int position, View convertView, ViewGroup parent) {
  
          ViewHolder holder;
  
          if (convertView == null) {
  
              holder = new ViewHolder();
  
              convertView = mInflater.inflate(R.layout.dropdown_text_twoline,
                      parent, false);
              holder.title = (TextView) convertView
                      .findViewById(R.id.text1);
              holder.description = (TextView) convertView
                      .findViewById(R.id.text2);
  
              convertView.setTag(holder);
          } else {
              holder = (ViewHolder) convertView.getTag();
          }
  
          return convertView;
      }
  
      public void add(TwoLineDropDown ei) {
  
          values.add(ei);
      }
  }
  </code></pre>
  
  <p><strong>But I face a problem here:</strong></p>
  
  <pre><code>TwoLineDropdownAdapter AutoCompleteAdapter = new TwoLineDropdownAdapter(this, items);
  myAutoComplete.setAdapter(AutoCompleteAdapter);
  </code></pre>
  
  <p><strong>while setting the Adapter it says:</strong></p>
  
  <blockquote>
    <p>Bound mismatch: The generic method setAdapter(T) of type
    AutoCompleteTextView is not applicable for the arguments
    (TwoLineDropdownAdapter). The inferred type TwoLineDropdownAdapter is
    not a valid substitute for the bounded parameter </p>
  </blockquote>
  
  <p>How to solve this?</p>
  
  <p>Thank You</p>