getToastScale static method

double getToastScale(
  1. int index,
  2. int toastsCount
)

This method returns the scale of the toast according to the index and the total number of toasts

Implementation

static double getToastScale(int index, int toastsCount) {
  if (toastsCount == 1) {
    return 1;
  } else if (toastsCount == 2) {
    if (index == 0) {
      return 0.95;
    }
    return 1;
  } else {
    if (index == 0) {
      return 0.90;
    } else if (index == 1) {
      return 0.95;
    }
    return 1;
  }
}