radio buttons alert box
<pre><code>public void mapDisplay() {
    final String[] selectedItem= getResources().getStringArray(R.array.map_display_choices);
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    // Set the dialog title
    builder.setTitle(R.string.mapDisplay)
           .setSingleChoiceItems(R.array.map_display_choices, mapDisplayOpt,
                      new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
                if(selectedItem[which].equals(Satellite)){
                    mapDisplayOpt = 1;
                    mapView.setSatellite(true);
                    dialog.dismiss();
                }else if(selectedItem[which].equals[Traffic]){
                    mapDisplayOpt = 2;
                    mapView.setTraffic(true);
                    dialog.dismiss();
                }else {
                    mapDisplayOpt = 0;
                    mapView.setStreetView(true);
                    dialog.dismiss();
                }
            }
           });             
    AlertDialog alert = builder.create();
    alert.show();      
}
</code></pre>

<p>I want to ask you a lot of things so if any of you can answer any of them please answer.<br>
1)how can i have the right <a href="/questions/tagged/radio-button" class="post-tag" title="show questions tagged 'radio-button'" rel="tag">radio-button</a> chosen when the alert box appear.i am using the mapDisplayOpt to put the right numbers for the radio buttons but i am not sure if the radio buttons are with the sequence of 1,2,3 or a random number?<br>
2)when i make the choice of o button the <a href="/questions/tagged/alert-box" class="post-tag" title="show questions tagged 'alert-box'" rel="tag">alert-box</a> immediately disappear and i can't see the selected option. how can i fix this?<br>
3)In <a href="/questions/tagged/android-google-maps" class="post-tag" title="show questions tagged 'android-google-maps'" rel="tag">android-google-maps</a> i change the mapView from the default to one of the satellite or traffic. how can i return to the default mapview? the streetView which i use is deprecated.<br>
thanks! </p>
