R
R
Radavan2021-01-12 14:20:40
Python
Radavan, 2021-01-12 14:20:40

Python Kivy how to implement calendar grid swiping?

How to implement swiping the grid of calendar days to the right and left in Kivy? Tried ScreenManager. But from the documentation I can't figure out exactly how to do it in code.
Now it turns out that there is only one Screen and this is the Container class. You need to make sure that when scrolling to the left, the next method is called, and to the right - prev with the addition of new Screen instances. I did it with buttons and without ScreenManager , but I need it to work with swiping.
Any ideas?
here is a schematic code in ru:

class Container(Screen):
    def week_day_abbr(self):
         pass
    def prev(self):
        pass
    def next(self):
        pass
    def month_days_all(self, month, year):
        pass

class CalmdApp(MDApp):
    def build(self):
            con = Container()
            sm = ScreenManager(transition = SlideTransition())
            sm.add_widget(con)
            return sm

if __name__ == "__main__":
    CalmdApp().run()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Worrik, 2021-01-13
@Worrik

There is a solution for this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question