Dialog which include items
<p>i want to create a dialog which when popup will show items. but the problem is that when i am popping my dialog it is showing only the title and a blank space i am not getting my items in my dialog.here is my code:</p>

<pre><code>@Override
public void onClick(View v) {

  final String list[]={"r","g","b"};

  AlertDialog.Builder alert = new AlertDialog.Builder(myAct.this);

  alert.setTitle("dialog with list");

  alert.setItems(list,new DialogInterface.OnClickListener(){
    @Override
    public void onClick(DialogInterface dialog,int which) {
      Toast.makeText(getApplicationContext(),""+list[which],1000).show()
    }
  });
  alert.show();
</code></pre>
