Alert Dialog Box Not Showing Android in list Activity
<p>I am facing a problem.
I have a Class that extends listactivity and its code is like this : </p>

<pre><code>public class QuestionListActivity extends ListActivity
{
//Members

private ImageButton bntRefresh;
private ImageButton bntSettings;
private ImageButton bntGetSurveys;


 /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.surveylist);

    initialize();

    currentSurveys=new SurveyList();
 }

private void initialize()
{
    bntRefresh= (ImageButton) findViewById(R.id.ibtnRefresh);
    bntRefresh.setImageResource(R.drawable.refresh);
    bntRefresh.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
        Toast.makeText(SurveyListActivity.this, "This will refresh the survey list.", Toast.LENGTH_SHORT).show();   
        }
    });



    bntSettings= (ImageButton) findViewById(R.id.ibtnSettings);
    bntSettings.setImageResource(R.drawable.settings);
    bntSettings.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            Toast.makeText(SurveyListActivity.this, "This will open the settings.", Toast.LENGTH_SHORT).show(); 
        }
    });

    bntGetSurveys= (ImageButton) findViewById(R.id.ibtnGetSurveys);
    bntGetSurveys.setImageResource(R.drawable.getsurvey);
    bntGetSurveys.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) 
        {
            AlertDialog getSurveyAlert = new AlertDialog.Builder(QuestionListActivity .this).create();
            getSurveyAlert.setTitle("Enter QR Code");
            getSurveyAlert.setMessage("Choose a source");
            getSurveyAlert.setButton("Camera", new DialogInterface.OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {

                }
            });
            getSurveyAlert.setButton2("text", new DialogInterface.OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {

                }
            });
        }
    });
}

    class SurveyAdapter extends ArrayAdapter&lt;Survey&gt;
    {
      //-- code here for adapter
    }
}
</code></pre>

<p>In my initialize function you can see I have three imagebuttons and I have implemented onClicklisteners for them.
For the Settings and refresh button I have shown a Toast, and it is working fine.
For the Get Button I have shown a dialog box which further asks the user to do something, but the problem I am facing is that dialog box is not appearing and I don't have any idea why ?</p>
