Giter Site home page Giter Site logo

kivymd_extensions's Introduction

KivyMD Extensions

KivyMD Extensions is a project to centralize community addons for KivyMD. You can find all extensions under @kivymd-extensions organization.

Extensions are maintained by community members such as yourself. If you want to create new extension, generate a repository from extension_template, change all extension_template and example_extension to your new extension name and edit code. When you will be ready to publish extension, create new issue at kivymd-extensions/KivyMD_Extensions with a link to your repository. We will create repository under organization profile and push your code there.

License

KivyMD Extensions is released under the terms of the MIT License, same as KivyMD.

kivymd_extensions's People

Contributors

artemsbulgakov avatar heattheatr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kivymd_extensions's Issues

ModuleNotFoundError: No module named 'kivymd.utils.fitimage'

File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\kivymd_extensions\sweetalert_init_.py", line 1, in
from .sweetalert import SweetAlert
File "C:\Users\my-pc2\AppData\Local\Programs\Python\Python310\lib\site-packages\kivymd_extensions\sweetalert\sweetalert.py", line 62, in
from kivymd.utils.fitimage import FitImage
ModuleNotFoundError: No module named 'kivymd.utils.fitimage'

Video player

Description of the extension

Need for a Material Video Player extension.

Example

An example that I tried to create:

from kivy.lang import Builder
from kivy.properties import NumericProperty, OptionProperty, StringProperty
from kivy.uix.floatlayout import FloatLayout
from kivymd.app import MDApp

Builder.load_string("""

<MDVideoPlayer>:
	MDBoxLayout:
		orientation: 'vertical'
		Video:
			id: video
			source: root.source
			state: root.state
			on_state: root.on_play(self)

		MDBoxLayout:
			adaptive_height: True
			orientation: 'vertical'
			MDSlider:
				id: slider
				min: 0
				max: video.duration
				value: str(root.slider_value)
				value: video.position if not self.active else 1
				on_active: root.on_slide(video, slider)
		MDBoxLayout:
			adaptive_height: True

			MDIconButton:
				icon: root.icon
				on_press:
					root.play_pause()

			MDIconButton:
				icon: 'stop'
				on_press:
					root.stop(slider)

			MDLabel:
				text: str(round(video.position)) + '/' + str(video.duration)
				size_hint: (None, None)
				size: self.texture_size
				font_style: 'Caption'

""")


class MDVideoPlayer(FloatLayout):
    source = StringProperty()
    state = OptionProperty("stop", options=("play", "pause", "stop"))
    icon = StringProperty("play")
    slider_value = NumericProperty(0)

    def play_pause(self):
        if self.icon == "play" and (self.state == "stop" or "pause"):
            self.state = "play"
            self.icon = "pause"
        elif self.icon == "pause" and self.state == "play":
            self.state = "pause"
            self.icon = "play"

    def stop(self, slider):
        self.state = "stop"
        self.slider_value = 0
        self.icon = "play"

    def on_play(self, vd):
        vd.position = self.slider_value

    def on_slide(self, slider):
        print(slider, video)
        video.state = "pause"
        video.position = slider.value
        video.state = "play"


class App(MDApp):
    def build(self):
        return MDVideoPlayer(source='/root/Videos/signup.mp4')


App().run()

CardStack

Link to repository

https://github.com/Guhan-SenSam/CardStack

Description of the extension

This extension adds a beautiful Card Stack Widget. The Widget enables you to create a stack of three cards that can be animated to move to the next card infinetly. The widget is designed in a way that three MDCards get reused infinetly to give the impression of an infinte stack of cards. You can add your own widgets to the front most card.
1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.