Transition#

#

A set of classes for implementing transitions between application screens.

Added in version 1.0.0.

Changing transitions#

You have multiple transitions available by default, such as:

  • MDFadeSlideTransition

    state one: the new screen closes the previous screen by lifting from the bottom of the screen and changing from transparent to non-transparent;

    state two: the current screen goes down to the bottom of the screen, passing from a non-transparent state to a transparent one, thus opening the previous screen;

Note

You cannot control the direction of a slide using the direction attribute.

https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/transition-md-fade-slide-transition.gif

API - kivymd.uix.transition.transition#

class kivymd.uix.transition.transition.MDTransitionBase#

TransitionBase is used to animate 2 screens within the MDScreenManager.

For more information, see in the TransitionBase class documentation.

start(instance_screen_manager: kivymd.uix.screenmanager.MDScreenManager) None#

(internal) Starts the transition. This is automatically called by the ScreenManager.

animated_hero_in() None#

Animates the flight of heroes from screen A to screen B.

animated_hero_out() None#

Animates the flight of heroes from screen B to screen A.

on_complete() None#

Override method. See :attr:`kivy.uix.screenmanager.TransitionBase.on_complete’.

class kivymd.uix.transition.transition.MDSwapTransition(**kwargs)#

Swap transition that looks like iOS transition when a new window appears on the screen.

class kivymd.uix.transition.transition.MDSlideTransition#

Slide Transition, can be used to show a new screen from any direction: left, right, up or down.

class kivymd.uix.transition.transition.MDFadeSlideTransition#

Slide Transition, can be used to show a new screen from any direction: left, right, up or down.

start(instance_screen_manager: kivymd.uix.screenmanager.MDScreenManager) None#

(internal) Starts the transition. This is automatically called by the ScreenManager.

on_progress(progression: float) None#
class kivymd.uix.transition.transition.MDSharedAxisTransition#

Android default screen transition.

Added in version 2.0.0.

transition_axis#

Axis of the transition. Available values “x”, “y”, and “z”.

https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/transition_axis.gif

transition_axis is an OptionProperty and defaults to “x”.

duration#

Duration in seconds of the transition. Android recommends these intervals:

Android transition values (in seconds)#

Name

value

small_1

0.075

small_2

0.15

medium_1

0.2

medium_2

0.25

large_1

0.3

large_2

0.35

duration is a NumericProperty and defaults to 0.15 (= 150ms).

switch_animation#

Custom material design animation transition.

switch_animation is a OptionProperty and defaults to “easing_decelerated”.

slide_distance#

Distance to which it slides left, right, bottom or up depending on axis.

slide_distance is a NumericProperty and defaults to dp(15).

opposite#

Decides Transition direction.

opposite is a BooleanProperty and defaults to False.

start(manager)#

(internal) Starts the transition. This is automatically called by the ScreenManager.

on_progress(progress)#
on_complete()#

Override method. See :attr:`kivy.uix.screenmanager.TransitionBase.on_complete’.