-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description private static intkeyboardLandscapeHeightprivate static intkeyboardPortraitHeight
-
Constructor Summary
Constructors Constructor Description StandardKeyboardHeightProvider(Activity activity)Construct a new KeyboardHeightProvider
-
Method Summary
Modifier and Type Method Description intgetKeyboardLandscapeHeight()intgetKeyboardPortraitHeight()voidstart()Start the KeyboardHeightProvider, this must be called after the onResume of the Activity. voidclose()Close the keyboard height provider, this provider will not be used anymore. voidsetKeyboardHeightObserver(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
-
getKeyboardLandscapeHeight
int getKeyboardLandscapeHeight()
-
getKeyboardPortraitHeight
int getKeyboardPortraitHeight()
-
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.
-
-
-
-