Python kivy.uix.behaviors.ButtonBehavior() Examples

The following are 4 code examples of kivy.uix.behaviors.ButtonBehavior(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module kivy.uix.behaviors , or try the search function .
Example #1
Source File: button.py    From KivyMD with MIT License 5 votes vote down vote up
def on_touch_up(self, touch):
		if not self.disabled:
			if touch.grab_current is not self:
				return super(ButtonBehavior, self).on_touch_up(touch)
			Animation.cancel_all(self, 'elevation')
			self.elevation_release_anim.start(self)
		return super(MDRaisedButton, self).on_touch_up(touch) 
Example #2
Source File: button.py    From KivyMD with MIT License 5 votes vote down vote up
def on_touch_up(self, touch):
		if not self.disabled:
			if touch.grab_current is not self:
				return super(ButtonBehavior, self).on_touch_up(touch)
			self.elevation_release_anim.stop(self)
			self.elevation_release_anim.start(self)
		return super(MDFloatingActionButton, self).on_touch_up(touch) 
Example #3
Source File: button.py    From Blogs-Posts-Tutorials with MIT License 5 votes vote down vote up
def on_touch_up(self, touch):
        if not self.disabled:
            if touch.grab_current is not self:
                return super(ButtonBehavior, self).on_touch_up(touch)
            Animation.cancel_all(self, 'elevation')
            self.elevation_release_anim.start(self)
        else:
            Animation.cancel_all(self, 'elevation')
            self.elevation = 0
        return super(MDRaisedButton, self).on_touch_up(touch) 
Example #4
Source File: button.py    From Blogs-Posts-Tutorials with MIT License 5 votes vote down vote up
def on_touch_up(self, touch):
        if not self.disabled:
            if touch.grab_current is not self:
                return super(ButtonBehavior, self).on_touch_up(touch)
            self.elevation_release_anim.stop(self)
            self.elevation_release_anim.start(self)
        return super(MDFloatingActionButton, self).on_touch_up(touch)