Back to API Reference
Class

KeyboardAvoidanceBehavior

sealed

Keeps the field (or any assigned target) visible above the software keyboard by translating it upward, animated in lockstep with the system keyboard — the classic "lift the form so the keyboard doesn't cover it" reaction.

Remarks

Translation moves anchoredPosition.y, so the target must not be driven by a layout group on that axis — point target at the popup / panel root, not a layout child (for layout-driven forms a resize or scroll reaction fits better). On platforms without frame-synced keyboard animation (iOS, Android <30, WebGL) the motion is driven client-side from the event's timing metadata, or fallbackDuration / fallbackEasing when the platform provides none.
protected bool IsAnimating{ get }
protected override void OnFocusGained()
protected override void OnFocusLost()
protected override void OnKeyboardWillShow()
protected override void OnKeyboardWillChangeFrame()
protected override void OnKeyboardWillHide()
protected override void OnKeyboardAnimationProgress()
protected override void OnKeyboardDidShow()
protected override void OnKeyboardDidHide()
protected override void OnKeyboardUpdate()