title: Android scrollable AlertDialog programmatically
body: <p>How can i programmatically make my AlertDialog Scrollable ?</p>
  
  <p>My AlertDialog is defined like this :</p>
  
  <pre><code>private void DisplayAlertChoice(String title, String msg, final int pos)
  {       
      alert = new AlertDialog.Builder(this);
      alert.setTitle(title);
      final LinearLayout layout = new LinearLayout(this);
      layout.setOrientation(LinearLayout.VERTICAL);
       CheckBox[] t=new CheckBox[15];
       for (i=0;i&lt;currentBattery.temperatureNumber;i++)
       {               
           t[i]=new CheckBox(this);
           t[i].setText("title");
           t[i].setChecked(false);
           t[i].setOnCheckedChangeListener(this);
  
           layout.addView(t[i]);      
       }
      alert.setView(layout);      
      alert.show();   
  </code></pre>
  
  <p>}</p>
  
  <p>I tried a few solutions found in the net but didn't work for me.</p>
  
  <p>Can someone give me a pertinent solution to make it scrollable programmatically ?</p>