Problem with my custom dialog which is having dynamic data
<p>I have a usecase like repeatedly calling the same dialog box with different values. I am using the same dialog creating code for that. First time the sent data is populated to dialog box. but next time the dialog box not getting rebuilt with different values when i call the same for next time.</p>

<p>Code is here</p>

<pre><code>            dialog.setContentView(R.layout.orderdialog);
            dialog.setTitle("Selected Item");
            dialog.setCanceledOnTouchOutside(true);

            System.out.println(selected);  // here i am sending different values eachtime. But not updating in dialog.

            TextView selectedItem = (TextView)dialog.findViewById(R.id.itemName);
            selectedItem.setText(selected);
</code></pre>
