2010-08-15 55 views

回答

2

你應該檢查AlertDialog和setSingleChoiceItems一些幫助上this link

0

Answer從另一篇文章:

CharSequence colors[] = new CharSequence[] {"red", "green", "blue", "black"}; 

AlertDialog.Builder builder = new AlertDialog.Builder(this); 
builder.setTitle("Pick a color"); 
builder.setItems(colors, new DialogInterface.OnClickListener() { 
    @Override 
    public void onClick(DialogInterface dialog, int which) { 
     // the user clicked on colors[which] 
    } 
}); 
builder.show();