Im trying to shrink button width from both sides but cant seem to figure out how. Here's few examples of what i've tried nothing worked. Some insight would be appreciated. Thanks.
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.base import runTouchApp
from kivy.properties import ObjectProperty
from kivy.animation import Animation
Builder.load_string('''
<SampleRoot>:
orientation:'vertical'
Button:
size_hint:None,None
size:300,100
pos_hint:{'x':.2}
on_press:root.do_stuff(self)
''')
class SampleRoot(BoxLayout):
butto=ObjectProperty()
def do_stuff(self,butt):
self.butto=butt
# anim=Animation(x=400) + Animation(size=(30,100)) # doesn't work
# anim=Animation(x=400,size=(30,100)) # doesn't work either
# anim=Animation(x=400)
anim=Animation(size=(30,100)) # doesnt work either
anim.start(butt)
anim.bind(on_progress=self.do_more)
def do_more(self,*args,**kwargs):
print "ha"
anim=Animation(right=400)
anim.start(self.butto)
runTouchApp(SampleRoot())