title: How to get Keyboard Height by the time app is opened
body: <p>I have used the below code for getting the keyboard height.</p>
  
  <pre>
  view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
              @Override
              public void onGlobalLayout() {
                  Rect rect = new Rect();
                  view.getWindowVisibleDisplayFrame(rect);
  
                  int screenHeight = view.getRootView().getHeight();
                  int keyboardHeight = screenHeight - rect.bottom;
                  if(keyboardHeight != 0){
                      if(orientation == Configuration.ORIENTATION_LANDSCAPE)
                          AppConfig.landscapeKeyboardHeight = keyboardHeight;
                      else if(orientation == Configuration.ORIENTATION_PORTRAIT)
                          AppConfig.portraitKeyboardHeight = keyboardHeight;
                  }
              }
          });
  </pre>
  
  <p>But this gives height only when the app opens keyboard for the first time at least. I want the height of keyboard even before the it gets open for the first time. Is there any way of doing this? Thanks in advance...</p>