title: Android Listview in alertDialog
body: <p>I have an activity with ListView populated by SQLite. you can see the ListView in an AlertDialog populated from db? is new to me!</p>
  
  <p>how to insert the logic to get the data? for example the method getView!</p>
  
  <pre><code>ListAdapter adapter = new ArrayAdapter&lt;Dettaglio&gt;(this, R.layout.dettaglio_cate, R.id.tv_noe_cat, dettagli){
  
  
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
              View row = super.getView(position, convertView, parent);
  
  
              TextView tvId, tvCaa;
              ImageView tvCe;
  
              tvCe = (ImageView) row.findViewById(R.id.color_view);                               tvId = (TextView) row.findViewById(R.id.lbl);
              tvCaa = (TextView) row.findViewById(R.id.tv_noria);
  
  
              Dettaglio d = dettagli.get(position);
  
              tvId.setText(d.id+"");
              tvCaa.setText(d.ca+"");
                    tvCe.setBackgroundColor(d.colore);
  
              return row;
          };
      };
      lista.setAdapter(adapter);
  }
  </code></pre>