Skip to content

Instantly share code, notes, and snippets.

@kived
Last active August 29, 2015 14:15
Show Gist options
  • Save kived/1a85095b44c2c09728c4 to your computer and use it in GitHub Desktop.
Save kived/1a85095b44c2c09728c4 to your computer and use it in GitHub Desktop.
Kivy: on_scroll_stop
import kivy
kivy.require('1.8.1')
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
<Button>:
size_hint_y: None
height: sp(64)
ScrollView:
#on_scroll_stop: app.sstop()
GridLayout:
cols: 1
size_hint_y: None
height: self.minimum_height
Button
Button
Button
Button
Button
Button
Button
Button
Button
Button
Button
Button
''')
class TestApp(App):
def build(self):
root.bind(on_scroll_stop=self.sstop)
return root
def sstop(self, *args):
print 'scroll stopped'
if __name__ == '__main__':
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment