Spinner¶
Circular progress indicator in Google’s Material Design.
Usage¶
from kivy.lang import Builder
from kivymd.app import MDApp
KV = '''
Screen:
MDSpinner:
size_hint: None, None
size: dp(46), dp(46)
pos_hint: {'center_x': .5, 'center_y': .5}
active: True if check.active else False
MDCheckbox:
id: check
size_hint: None, None
size: dp(48), dp(48)
pos_hint: {'center_x': .5, 'center_y': .4}
active: True
'''
class Test(MDApp):
def build(self):
return Builder.load_string(KV)
Test().run()
API - kivymd.uix.spinner
¶
-
class
kivymd.uix.spinner.
MDSpinner
(**kwargs)¶ Bases:
kivymd.theming.ThemableBehavior
,kivy.uix.widget.Widget
MDSpinner
is an implementation of the circular progress indicator in Google’s Material Design.It can be used either as an indeterminate indicator that loops while the user waits for something to happen, or as a determinate indicator.
Set
determinate
to True to activate determinate mode, anddeterminate_time
to set the duration of the animation.-
determinate
¶ determinate
is aBooleanProperty
and defaults to False.
-
determinate_time
¶ determinate_time
is aNumericProperty
and defaults to 2.
-
active
¶ Use
active
to start or stop the spinner.active
is aBooleanProperty
and defaults to True.
-
color
¶ color
is aListProperty
and defaults toself.theme_cls.primary_color
.
-
on__rotation_angle
(self, *args)¶
-
on_active
(self, *args)¶
-