protected int getWidth() {
   return (int) (Style.getDisplayMetrics().widthPixels * DIALOG_SIZE_WIDTH);
 }
 protected boolean isSmallScreen() {
   return Style.getDisplayMetrics().heightPixels < 500;
 }
 protected int getHeight() {
   return (int)
       (Style.getDisplayMetrics().heightPixels * (isSmallScreen() ? 1.0f : DIALOG_SIZE_HEIGHT));
 }