getWindowGravity static method

String getWindowGravity(
  1. SystemWindowGravity gravity
)

Converts SystemWindowGravity to string format

Implementation

static String getWindowGravity(SystemWindowGravity gravity) {
  //if (gravity == null) gravity = SystemWindowGravity.TOP;
  switch (gravity) {
    case SystemWindowGravity.CENTER:
      return "center";
    case SystemWindowGravity.BOTTOM:
      return "bottom";
    case SystemWindowGravity.TOP:
    default:
      return "top";
  }
}