BottomSheet
BottomSheet copied to clipboard
IndexOutOfBoundsException
when I use builder.setItem(); like this example:
int[] items = new int[] {
R.string.share,
R.string.upload,
R.string.copy,
R.string.print_this_page
};
builder.setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// your code here.
}
});
I get
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.get(ArrayList.java:437)