2017-04-09 98 views
0
  Dialog alertDialog = new AlertDialog.Builder(CameraActivity.this). 
        setIcon(R.mipmap.ic_launcher). 
        setTitle("test"). 
        setSingleChoiceItems(strs, 0, new DialogInterface.OnClickListener() { 
       @Override 
       public void onClick(DialogInterface dialog, int which) { 
       } 
      }).create(); 
      alertDialog.show(); 

以上是我的代碼,這是我的結果,如下所示。 enter image description here如何在alertdialog中將按鈕設置在右側

但我想在左邊顯示文字,在右邊顯示單選按鈕。

回答

0

您可能想要使用列表視圖,然後在使用陣列適配器的同時將該視圖充氣到alertdialog。

相關問題