Package 

Class StandardKeyboardHeightProvider

  • All Implemented Interfaces:
    com.badlogic.gdx.backends.android.keyboardheight.KeyboardHeightProvider

    
    public class StandardKeyboardHeightProvider
    extends PopupWindow implements KeyboardHeightProvider
                        

    The keyboard height provider, this class uses a PopupWindow to calculate the window height when the floating keyboard is opened and closed.

    • Method Summary

      Modifier and Type Method Description
      int getKeyboardLandscapeHeight()
      int getKeyboardPortraitHeight()
      void start() Start the KeyboardHeightProvider, this must be called after the onResume of the Activity.
      void close() Close the keyboard height provider, this provider will not be used anymore.
      void setKeyboardHeightObserver(KeyboardHeightObserver observer) Set the keyboard height observer to this provider.
      • Methods inherited from class android.widget.PopupWindow

        dismiss, getAnimationStyle, getBackground, getContentView, getElevation, getEnterTransition, getEpicenterBounds, getExitTransition, getHeight, getInputMethodMode, getMaxAvailableHeight, getOverlapAnchor, getSoftInputMode, getWidth, getWindowLayoutType, isAboveAnchor, isAttachedInDecor, isClippedToScreen, isClippingEnabled, isFocusable, isLaidOutInScreen, isOutsideTouchable, isShowing, isSplitTouchEnabled, isTouchModal, isTouchable, setAnimationStyle, setAttachedInDecor, setBackgroundDrawable, setClippingEnabled, setContentView, setElevation, setEnterTransition, setEpicenterBounds, setExitTransition, setFocusable, setHeight, setIgnoreCheekPress, setInputMethodMode, setIsClippedToScreen, setIsLaidOutInScreen, setOnDismissListener, setOutsideTouchable, setOverlapAnchor, setSoftInputMode, setSplitTouchEnabled, setTouchInterceptor, setTouchModal, setTouchable, setWidth, setWindowLayoutMode, setWindowLayoutType, showAsDropDown, showAtLocation, update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StandardKeyboardHeightProvider

        StandardKeyboardHeightProvider(Activity activity)
        Construct a new KeyboardHeightProvider
        Parameters:
        activity - The parent activity
    • Method Detail

      • start

         void start()

        Start the KeyboardHeightProvider, this must be called after the onResume of the Activity. PopupWindows are not allowed tobe registered before the onResume has finished of the Activity.

      • close

         void close()

        Close the keyboard height provider, this provider will not be used anymore.

      • setKeyboardHeightObserver

         void setKeyboardHeightObserver(KeyboardHeightObserver observer)

        Set the keyboard height observer to this provider. The observer will be notified when the keyboard height has changed. Forexample when the keyboard is opened or closed.

        Parameters:
        observer - The observer to be added to this provider.