I have a dialog appear when i press a button with dynamic data but when i press the same button again the same data appears .I used log to find out why the next question is not shows there was a warning that " Window already focused ignoring focus" Below is the code

```
protected Dialog onCreateDialog(int id)
{ AlertDialog.Builder dilog = new AlertDialog.Builder(this); 

switch (id)

    {

        case 99:
                String qa = showNext(); //gets question from database new  question  every time   

                dilog.setTitle("Team A player" + contactList.get(1).getName());
                dilog.setMessage(qa);

                dilog.setNegativeButton("ok", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int id)
                    {

                        dialog.cancel();
                    }   
                });

            break;

        }
        return dilog.create();

        }

```