Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created April 6, 2015 14:33
Show Gist options
  • Save tshirtman/9c8ab3692927df2b1a89 to your computer and use it in GitHub Desktop.
Save tshirtman/9c8ab3692927df2b1a89 to your computer and use it in GitHub Desktop.
from kivy.base import runTouchApp
from kivy.lang import Builder
KV = '''
#:import Animation kivy.animation.Animation
FloatLayout:
BoxLayout:
id: box
orientation: 'vertical'
size_hint: .4, .4
center_x: root.center_x
center_y: root.center_y
Button:
text: 'push me'
on_press:
(
Animation(right=0, t='out_elastic') +
Animation() +
Animation(center_x=root.center_x, t='out_elastic')
).start(box)
'''
runTouchApp(Builder.load_string(KV))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment