code: public void setLayoutParameters() {
          final int keypadWidth = styledAttributes.getDimensionPixelOffset(R.styleable.PinLock_keypadWidth, 200);
          final int keypadHeight = styledAttributes.getDimensionPixelOffset(R.styleable.PinLock_keypadHeight, 230);
          final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(keypadWidth, keypadHeight);
          params.gravity = 17;
          setLayoutParams(params);
      }
docs: Setting up layout dimensional parameters for the view