Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/avour/reloadbehavior

A mixin widget that can be added to a scroll veiw to give it a reloading behavior
https://github.com/avour/reloadbehavior

Last synced: 27 days ago
JSON representation

A mixin widget that can be added to a scroll veiw to give it a reloading behavior

Awesome Lists containing this project

README

        

ReloadBehavior
=========

`ReloadBehavior` is a mixin behavior widget, that adds a reloading animations to a
ScrollView. when the user drags down to get the effect user get notified by
the `on_reload` event.

### Demo Screenshot



Here is a simple example:

```python
from kivy.garden.reloadbehavior import ReloadBehavior
from kivy.base import runTouchApp

class Reloader(ReloadBehavior, ScrollView):

def on_reload(self):
# do anythin
print('Reloading........')

gridlayout = Builder.load_string('''
GridLayout:
size_hint_y: None
height: self.minimum_height
cols: 1
''')

reloader = Reloader()
reloader.add_widget(grid)
for i in range(20):
grid.add_widget(Button(size_hint_y=None,
text=str(i+1), height='46dp'))

(root)
```