I have a List in an AlertDialog;
public void thesaurusBtnAction(){
// setup the alert builder
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Synonyms List");
// add a list
String[] someList = {"a", "b", "c", "d", "e","a","b"};
builder.setItems(someList, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which) {
case 0:
case 1:
case 2:
case 3:
case 4:
}
}
});
// create and show the alert dialog
AlertDialog dialog = builder.create();
dialog.show();
}
I want to make the list in here a scrollable one and also make the AlertDialog size limit to a certain size as the AlertDialog try to increase it's size as the list grows.