Swipe
Swiping allows users to interact with widgets by using hidden actions
- class kivycupertino.uix.swipe.CupertinoSwipe(*args: Any, **kwargs: Any)
A widget to add swiping functionality to existing Kivy Cupertino widgets
- background_color = [1, 1, 1, 1]
Background color of
CupertinoSwipe
Python
CupertinoSwipe(background_color=(1, 0, 0, 1))
KV
CupertinoSwipe: background_color: 1, 0, 0, 1
- collapse()
Callback to reset
CupertinoSwipe
so no actions are visible
- complete_swipe_duration = 0.5
How long after
CupertinoSwipe
is released until swipe is moved to final position (completely expanded or completely collapsed)Python
CupertinoSwipe(complete_swipe_duration=1)
KV
CupertinoSwipe: complete_swipe_duration: 1
- expand(side)
Callback to completely open a specified side
CupertinoSwipe
- Parameters
side – The side of
CupertinoSwipe
to expand ('left'
or'right'
)
- is_collapsed()
Check if
CupertinoSwipe
is collapsed- Returns
If
CupertinoSwipe
is collapsed
- class kivycupertino.uix.swipe.CupertinoSwipeAction(*args: Any, **kwargs: Any)
An iOS style action to add to
CupertinoSwipe
- color_disabled = [0, 0.3, 0.4, 1]
Color of
CupertinoSwipeAction
when disabledPython
CupertinoSwipeAction(disabled=True, color_disabled=(0.5, 0, 0, 1))
KV
CupertinoSwipeAction: disabled: True color_disabled: 0.5, 0, 0, 1
- color_normal = [1, 0, 0, 1]
Color of
CupertinoSwipeAction
when not pressed or disabledPython
CupertinoSwipeAction(color_normal=(1, 0, 0, 1))
KV
CupertinoSwipeAction: color_normal: 1, 0, 0, 1
- disabled = False
If
CupertinoSwipeAction
is disabledPython
CupertinoSwipeAction(disabled=True)
KV
CupertinoSwipeAction: disabled: True
- side = 'left'
Side of
CupertinoSwipe
thatCupertinoSwipeAction
should be shown onPython
CupertinoSwipeAction(side='right')
KV
CupertinoSwipeAction: side: 'right'
- symbol = ' '
Text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(symbol='trash_fill')
KV
CupertinoSwipeAction: symbol: 'trash_fill'
- text = ' '
Text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(text='Delete')
KV
CupertinoSwipeAction: text: 'Delete'
- text_color = [1, 1, 1, 1]
Color of text of
CupertinoSwipeAction
Python
CupertinoSwipeAction(text_color=(1, 0, 0, 1))
KV
CupertinoSwipeAction: text_color: 1, 0, 0, 1