ProgressBar

Progress indicators express an unspecified wait time or display the length of a process.

https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/progress-bar-preview.png

KivyMD provides the following bars classes for use:

MDProgressBar

from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDBoxLayout:
    padding: "10dp"

    MDProgressBar:
        value: 50
'''


class Test(MDApp):
    def build(self):
        return Builder.load_string(KV)


Test().run()
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/progress-bar.png

Vertical orientation

MDProgressBar:
    orientation: "vertical"
    value: 50
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/progress-bar-vertical.png

With custom color

MDProgressBar:
    value: 50
    color: app.theme_cls.accent_color
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/progress-bar-custom-color.png

Indeterminate

from kivy.lang import Builder
from kivy.properties import StringProperty

from kivymd.app import MDApp

KV = '''
MDScreen:

    MDProgressBar:
        id: progress
        pos_hint: {"center_y": .6}
        type: "indeterminate"

    MDRaisedButton:
        text: "STOP" if app.state == "start" else "START"
        pos_hint: {"center_x": .5, "center_y": .45}
        on_press: app.state = "stop" if app.state == "start" else "start"
'''


class Test(MDApp):
    state = StringProperty("stop")

    def build(self):
        return Builder.load_string(KV)

    def on_state(self, instance, value):
        {
            "start": self.root.ids.progress.start,
            "stop": self.root.ids.progress.stop,
        }.get(value)()


Test().run()
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/indeterminate-progress-bar.gif

Determinate

MDProgressBar:
    type: "determinate"
    running_duration: 1
    catching_duration: 1.5
https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/determinate-progress-bar.gif

API - kivymd.uix.progressbar.progressbar

class kivymd.uix.progressbar.progressbar.MDProgressBar(**kwargs)

Class for creating a progress bar widget.

See module documentation for more details.

reversed

Reverse the direction the progressbar moves.

reversed is an BooleanProperty and defaults to False.

orientation

Orientation of progressbar. Available options are: ‘horizontal ‘, ‘vertical’.

orientation is an OptionProperty and defaults to ‘horizontal’.

color

Progress bar color in rgba format.

color is an ColorProperty and defaults to None.

back_color

Progress bar back color in rgba format.

New in version 1.0.0.

back_color is an ColorProperty and defaults to None.

running_transition

Running transition.

running_transition is an StringProperty and defaults to ‘in_cubic’.

catching_transition

Catching transition.

catching_transition is an StringProperty and defaults to ‘out_quart’.

running_duration

Running duration.

running_duration is an NumericProperty and defaults to 0.5.

catching_duration

Catching duration.

running_duration is an NumericProperty and defaults to 0.8.

type

Type of progressbar. Available options are: ‘indeterminate ‘, ‘determinate’.

type is an OptionProperty and defaults to None.

check_size(self, interval: Union[int, float])
start(self)

Start animation.

stop(self)

Stop animation.

running_away(self, *args)
catching_up(self, *args)