Motion#
Use motion to make a UI expressive and easy to use. New in version 1.2.0. Classes of the Motion type implement the display behavior of widgets such
as dialogs, dropdown menu, snack bars, and so on.
API - kivymd.uix.behaviors.motion_behavior
#
- class kivymd.uix.behaviors.motion_behavior.MotionBase#
Base class for widget display movement behavior.
- show_transition#
The type of transition of the widget opening.
show_transition
is aStringProperty
and defaults to ‘linear’.
- show_duration#
Duration of widget display transition.
show_duration
is aNumericProperty
and defaults to 0.2.
- hide_transition#
The type of transition of the widget closing.
hide_transition
is aStringProperty
and defaults to ‘linear’.
- hide_duration#
Duration of widget closing transition.
hide_duration
is aNumericProperty
and defaults to 0.2.
- class kivymd.uix.behaviors.motion_behavior.MotionDropDownMenuBehavior(**kwargs)#
Base class for the dropdown menu movement behavior.
For more information, see in the
MotionBase
class documentation.- show_transition#
The type of transition of the widget opening.
show_transition
is aStringProperty
and defaults to ‘out_back’.
- show_duration#
Duration of widget display transition.
show_duration
is aNumericProperty
and defaults to 0.2.
- hide_transition#
The type of transition of the widget closing.
hide_transition
is aStringProperty
and defaults to ‘out_cubic’.
- set_opacity(self)#
- set_scale(self)#
- on_dismiss(self)#
- on_open(self, *args)#
- on__opacity(self, instance, value)#
- on__scale_x(self, instance, value)#
- on__scale_y(self, instance, value)#
- class kivymd.uix.behaviors.motion_behavior.MotionDialogBehavior(**kwargs)#
Base class for dialog movement behavior.
For more information, see in the
MotionBase
class documentation.- show_duration#
Duration of widget display transition.
show_duration
is aNumericProperty
and defaults to 0.1.
- scale_x#
Default X-axis scaling values.
scale_x
is aNumericProperty
and defaults to 1.5.
- scale_y#
Default Y-axis scaling values.
scale_y
is aNumericProperty
and defaults to 1.5.
- set_default_values(self)#
Sets default scaled and transparency values.
- on_dismiss(self, *args)#
Called when a dialog closed.
- on_open(self, *args)#
Called when a dialog opened.
- class kivymd.uix.behaviors.motion_behavior.MotionShackBehavior#
The base class for the behavior of the movement of snack bars.
For more information, see in the
MotionBase
class andStencilBehavior
class documentation.- on_dismiss(self, *args)#
Called when a snackbar closed.
- on_open(self, *args)#
Called when a snackbar opened.