@Override
  public boolean handleMessage(Message message) {

    switch (message.what) {
      case SET_PREFILLED_RESOLUTION:
        if (getActivity() != null) {
          Size size = getRealScreenDimensions();

          editTextHeight.setText(Integer.toString(size.getHeight()));
          editTextWidth.setText(Integer.toString(size.getWidth()));
        }
        break;
    }

    return false;
  }
  public Size getSize() {
    int width;
    int height;
    try {
      width = Integer.parseInt(editTextWidth.getTextString());
    } catch (NumberFormatException e) {
      width = 0;
    }
    try {
      height = Integer.parseInt(editTextHeight.getTextString());
    } catch (NumberFormatException e) {
      height = 0;
    }

    return new Size(width, height);
  }