Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use GearTick from garden which is a rotating slider. It's not exactly what you need but can be adapted for your needs. "By default it allows rotation anti-clockwise you probably would need it to go clockwise"(Update: The widget now has a <code>orientation</code> property that can be set to 'clockwise' or 'anti-clockwise').</p> <p>You would need to manage the spring back and stopping at the "finger stop". </p> <p>The example at the ends manage spring back using animation, however you still need to manage/implement the finger stop functionality.</p> <p><a href="https://github.com/kivy-garden/garden.geartick" rel="nofollow noreferrer">https://github.com/kivy-garden/garden.geartick</a></p> <p>Usage::</p> <p>Python::</p> <pre><code>from kivy.garden.geartick import GearTick parent.add_widget(GearTick(range=(0, 100))) </code></pre> <p>kv::</p> <pre><code>BoxLayout: orientation: 'vertical' GearTick: id: gear_tick zoom_factor: 1.1 # uncomment the following to use non default values #max: 100 #background_image: 'background.png' #overlay_image: 'gear.png' #orientation: 'anti-clockwise' on_release: Animation.stop_all(self) Animation(value=0).start(self) Label: size_hint: 1, None height: '22dp' color: 0, 1, 0, 1 text: ('value: {}').format(gear_tick.value) </code></pre> <p><img src="https://i.stack.imgur.com/2kCMl.jpg" alt="enter image description here"></p> <p>To install::</p> <pre><code>pip install kivy-garden garden install geartick </code></pre> <p>Working Example that you can copy paste::</p> <pre><code>from kivy.lang import Builder from kivy.app import runTouchApp from kivy.garden.geartick import GearTick runTouchApp(Builder.load_string(''' #:import Animation kivy.animation.Animation GridLayout: cols: 2 canvas.before: Color: rgba: 1, 1, 1, 1 Rectangle: size: self.size pos: self.pos BoxLayout: orientation: 'vertical' GearTick: id: gear_tick zoom_factor: 1.1 # uncomment the following to use non default values #max: 100 #background_image: 'background.png' #overlay_image: 'gear.png' #orientation: 'anti-clockwise' on_release: Animation.stop_all(self) Animation(value=0).start(self) Label: size_hint: 1, None height: '22dp' color: 0, 1, 0, 1 text: ('value: {}').format(gear_tick.value) ''')) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload