title: How to display Dialog in Contacts
body: <p>I used this code for a button, after that I am in the Contacts Activity:</p>
  
  <pre><code>btnPhonebook.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent pb = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
              startActivityForResult(pb, 1);
          }
      });
  </code></pre>
  
  <p>After that, there is a contact list with many contacts. Now I want that, whenever I clicked to a contact, a dialog is displayed. How can I do that. Could anyone help me because currently I have no issue how to make it. I have tried with this code but it did not work.</p>
  
  <pre><code>Dialog dialog = new Dialog(this);
              AlertDialog.Builder builder = new AlertDialog.Builder(this);
              builder.setTitle("Choose a phone number");
  
              ListView lp = new ListView(this);
              lp.setAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, android.R.id.text1, _listPhoneNumber));
  
              builder.setView(lp);
              dialog = builder.create();
  </code></pre>
  
  <p>Also I put the above code in onActivityResult() method.</p>
  
  <p>Thanks in advance.</p>