I have an alert dialog and using setSingleChoiceItems to set the selected item, but want to display the list from top
<p>I have an alert dialog window and using the below code to set the choice item from the list as default. I couldn't find any proper solution in Stackoverflow so adding the question</p>

<p><strong>CustomDialog class that returns a Dialog to my Activity</strong></p>

<pre><code>public class CustomDialog extends DialogFragment {

  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
         ...
    AlertDialog.Builder b = new AlertDialog.Builder();
    b.setSingleChoiceItems(Language.names, 5, new OnClickListener() {
       ....
    }

    AlertDialog dialog = b.create();

    return dialog;
 }
</code></pre>

<p><strong>In Activity:</strong></p>

<pre><code>    FragmentManager manager = getFragmentManager();
    CustomDialog alert = new CustomDialog();

    // Creating a bundle object to store the selected item's index
    Bundle b = new Bundle();

    // Storing the selected item's index in the bundle object : Get current language
    // code and set the position
    b.putInt("position", 5); // sending the 5

    // Setting the bundle object to the dialog fragment object
    alert.setArguments(b);

    // Creating the dialog fragment object, which will in turn open the alert dialog window
    alert.show(manager, "alert_dialog_radio");
</code></pre>

<p>Now it displays the particular position which is right, but issue I have is it scrolls the position and keep this position in the top. </p>

<p>Is there a way I can set the list to be displayed starting at position 0 but the selected item is 5. So idea is pass 5 and show 5 selected but it should start the display at 0.</p>