Attempt to mimic Android's TapTargetView using Kivy and Python
Project description
TapTargetView
An attempt to mimic android's TapTargetView using Python and Kivy.
Inspired by Android's TapTargetView
Installation
Using Pip
pip install taptargetview
Manually
-
git clone https://github.com/shashi278/TapTargetView.git
-
cd TapTargetView
-
python setup.py install
Simple Usage
TapTargetView(
my_button,
outer_circle_color= [0,1,1],
outer_circle_alpha= .85,
title_text= "My Button",
description_text="It does something when pressed",
widget_position="center",
title_position="right_bottom",
on_end= my_callback
).start()
Refer to demo for extensive usages.
Sequencing
Sequencing is easier. Just bind start
of one instance to the on_end
of another instance.
ttv2= TapTargetView(
my_button2,
outer_circle_color= [1,0,1],
outer_circle_alpha= .05,
title_text= "My Second Button",
description_text="It too does something when pressed",
widget_position="left",
on_end= my_callback
)
ttv1= TapTargetView(
my_button1,
outer_circle_color= [0,1,1],
outer_circle_alpha= .85,
title_text= "My First Button",
description_text="It does something when pressed",
widget_position="center",
title_position="right_bottom",
on_end= ttv2.start
)
ttv1.start()
Customizable attributes:
"""
widget: widget to add TapTargetView upon
outer_radius: (optional), Radius for outer circle, defaults to dp(300)
outer_circle_color: (optional), Color for the outer circle, defaults to [1,0,0]
outer_circle_alpha: (optional), Alpha value for outer circle, defaults to .96
target_radius: (optional), Radius for target circle, defaults to dp(45)
target_circle_color: (optional), Color for target circle, defaults to [1,1,1]
title_text: (optional), Title to be shown on the view, defaults to ''
title_text_size: (optional), Text size for title, defaults to dp(25)
title_text_color: (optional), Text color for title, defaults to [1,1,1,1]
title_text_bold: (optional), Whether title should be bold, defaults to `True`
description_text: (optional), Description to be shown below the title(Keep it short),
defaults to ''
description_text_size: (optional), Text size for description text, defaults to dp(20)
description_text_color: (optional), Text color for description text, defaults to [.9,.9,.9,1]
description_text_bold: (optional), Whether description should be bold, defaults to False
draw_shadow: (optional), Whether to show shadow, defaults to False
cancelable: (optional), Whether clicking outside the outer circle dismisses the view,
defaults to False
widget_position: (optional), Sets the position of the widget on the outer_circle.
Can be one of "left","right","top","bottom","left_top","right_top",
"left_bottom","right_bottom", and "center", defaults to "left"
title_position: (optional), Sets the position of `title_text` on the outer circle.
Only works if `widget_position` is set to "center". In all other cases,
it calculates the `title_position` itself.
Must be set to other than "auto" when `widget_position` is set to "center".
Can be one of "left","right","top","bottom","left_top","right_top",
"left_bottom", and "right_bottom", defaults to "auto" (since `widget_position` is "left")
stop_on_outer_touch: (optional), whether clicking on outer circle stops the animation,
defaults to False
stop_on_target_touch: (optional), whether clicking on target circle should stop the animation,
defaults to True
on_end: (optional), Function to be called when the animation stops, defaults to None
"""
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TapTargetView-0.1.2.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file TapTargetView-0.1.2.tar.gz
.
File metadata
- Download URL: TapTargetView-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efbf63af4fafea9db0596ca18a36c81cec2460bc7b1558c340c454d5b62606fc |
|
MD5 | 9b1dd900a9fccf6174198ea8a8fdc549 |
|
BLAKE2b-256 | 459dd0034c71f7edc3b1de7138236754b3e52852e9db399bdf636742b2224886 |
File details
Details for the file TapTargetView-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: TapTargetView-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9fe5dc6ca6c438653558372fe1caed85ad21a69a2f536ad1fc995dc415485ec |
|
MD5 | 4f97be5de64743699597c7c9809f5a90 |
|
BLAKE2b-256 | d72ebf2dfa28c001ef35f3af6ee654d75b8e0cbe00d7d924ac8642c4eddd1481 |