zen-code / kivybits Goto Github PK
View Code? Open in Web Editor NEWKivy bits and pieces
License: MIT License
Kivy bits and pieces
License: MIT License
http://kivy.org/docs/api-kivy.uix.scatter.html#kivy.uix.scatter.Scatter.transform
There is no description at all on how to use a transform matrix
Could need some information what it actually is compared to image
Would be nice to have a page on the wiki describing how to:
"Packaging your application into an APK¶
This section describes how to download and use python-for-android directly.
You’ll need:
A linux computer or virtual machine"
There is a virtual machine in the download section.
So i suggest to make a short manual about how to use the virtual machine and then link the text "virtual machine" to it.
hi, what's the password of root user in KivyCompleteVM?
kivy@kivy-complete:~$ sudo adduser newuser vboxusers
[sudo] password for kivy:
how to run the sudo
command?
thanks
Not an issue, just a heads up.
I uploaded a newer version (updated, a little restructured and with kivyMD support) of your PyCharm_kv_completion.jar
here.
Thank you for your initial work at this, and many other kivy things (BTW just got the new VM and its great!)
The present docs are pretty skimpy on how to work with the Kivy XCode project. Expand the docs here to include some more information.
https://groups.google.com/forum/#!topic/kivy-users/TgZi_jLJmBo
https://dl.dropboxusercontent.com/u/12755967/python/stencils_are_weird.zip
Zeddy no matter what I set the colour to, the result becomes exactly the same
Zeddy but if you remove that first recctangle, the visible part of the stencil is only that circle
Zeddy The rules for how stencils work seem confusing to me
Zeddy It would be much more convenient to be able to specify a depth between 0 and 255 to draw
Zeddy and then your next shape is drawn with that depth
Zeddy depth is the wrong word but you hopefully know what I mean
Zeddy instead there seems to be this complete guesswork where some shapes sometimes draw black, others draw white, and others again alternate based on entirely arbitrary rules
hey, i'm really struggling with this very last problem during buildozer build that is [WARNING]: ERROR: ./gradlew failed!. error details:
INFO: Selecting java build tool:
INFO: Detected highest available build tools version to be 28.0.2
INFO: Building with gradle, as gradle executable is present
[DEBUG]: -> running gradlew assembleDebug
[DEBUG]: > Configuring > 0/1 projects > root project > Resolving dependenIncremental java compilation is an incubating feature.
[DEBUG]: :preBuild UP-TO-DATE
[DEBUG]: :preDebugBuild UP-TO-DATE
[DEBUG]: :checkDebugManifest
[DEBUG]: :prepareDebugDependencies
[DEBUG]: :compileDebugAidl
[DEBUG]: :compileDebugRenderscript
[DEBUG]: :generateDebugBuildConfig
[DEBUG]: :generateDebugResValues
[DEBUG]: :generateDebugResources
[DEBUG]: :mergeDebugResources
[DEBUG]: :processDebugManifest
[DEBUG]: :processDebugResources
[DEBUG]: :generateDebugSources
[DEBUG]: :incrementalDebugJavaCompilationSafeguard
[DEBUG]: :javaPreCompileDebug
[DEBUG]: :compileDebugJavaWithJavac
[DEBUG]: :compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
[DEBUG]: /home/kivy/test3/.buildozer/android/platform/build/dists/myapp/src/main/java/org/kivy/android/PythonService.java:97: error: cannot find symbol
[DEBUG]: notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent);
[DEBUG]: ^
[DEBUG]: symbol: method setLatestEventInfo(Context,String,String,PendingIntent)
[DEBUG]: location: variable notification of type Notification
[DEBUG]: Note: Some input files use or override a deprecated API.
[DEBUG]: Note: Recompile with -Xlint:deprecation for details.
[DEBUG]: 1 error
[DEBUG]: :compileDebugJavaWithJavac FAILED
[DEBUG]:
[DEBUG]: FAILURE: Build failed with an exception.
[DEBUG]:
[DEBUG]: * What went wrong:
[DEBUG]: Execution failed for task ':compileDebugJavaWithJavac'.
[DEBUG]: > Compilation failed; see the compiler error output for details.
[DEBUG]:
[DEBUG]: * Try:
[DEBUG]: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[DEBUG]:
[DEBUG]: BUILD FAILED
[DEBUG]:
[DEBUG]: Total time: 12.647 secs
Exception in thread background thread for pid 31613:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
handle_exit_code(exit_code)
File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/kivy/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
ErrorReturnCode_1:
RAN: ./gradlew assembleDebug
STDOUT:
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:javaPreCompileDebug
:compileDebugJavaWithJavac
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/home/kivy/test3/.buildozer/android/platform/build/dists/myapp/src/main/java/org/kivy/android/PythonService.java:97: error: cannot find symbol
notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent);
^
symbol: method setLatestEventInfo(Context,String,String,PendingIntent)
location: variable notification of type Notification
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
BUILD FAILED
Total time: 12.647 secs
STDERR:
[DEBUG]:
INFO: STDOUT (last 20 lines of 41):
symbol: method setLatestEventInfo(Context,String,String,PendingIntent)
location: variable notification of type Notification
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
BUILD FAILED
Total time: 12.647 secs
cd /home/kivy/test3/.buildozer/android/platform/build/dists/myapp && ./gradlew assembleDebug
[WARNING]: ERROR: ./gradlew failed!
remedies i've tried include: - buildozer android clean - deleting .buildozer folder - reinstalling API 27 builds tools, API 28 build tools are the higest though! - reinstalling open jdk 8
Hei, i found this:
http://kivy.org/docs/api-kivy.uix.scatter.html#kivy.uix.scatter.Scatter.apply_transform
Parameters :
trans: Matrix.
Transformation matix to be applied to the scatter widget.
anchor: tuple, defaults to (0, 0).
The point to use as the origin of the transformation (uses local widget space).
post_multiply: bool, defaults to False.
If True, the transform matrix is post multiplied (as if applied before the current transform).
Usage example:
from kivy.graphics.transformation import Matrix
mat = Matrix().scale(3, 3, 3)
scatter_instance.apply_transform(mat)
It would be good to add more informations about
trans: Matrix.
Transformation matix to be applied to the scatter widget.
Where to look for what transformations can be used and what syntax they have.
https://gist.github.com/rainbowdesign/8872759
Hope its not my fault in the code.
The docs for graphics/stencil_instructions.pyx seems very unclear when in comes to StencilUnUse. Check and submit PR for changes.
I would love to see a way to make simple operations inside the bind and directly call functions without working with partial.
mplus.bind(on_press=(dmmodp=dmmodp +1))
Instead of using a seperate function.
if there is no way to improve it describe how to use bind and partial in the description, maybe here:
http://kivy.org/docs/api-kivy.uix.button.html
i hope you understand it i cannot focus well right now.
Sorry whats the VM password?
The download link is invalid.
On Linux, some errors are pumped to the console when the user does not have permission to certain devices. Rather trap and log them.
All other image file types work but GIFs, even kivy.Loader.loading_image
causes the app to crash when a gif file is used (ie. "image-loading.gif")
That wasn't really a problem until I noticed pil cannot process/read all gif files. I have tried os.environ['KIVY_IMAGE'] = 'sdl2, gif'
before importing kivy but I get a unknown <gif> type, no loader found error
.
Also sudo apt-get install libgif-dev
didn't really help.
Buildozer requirements= Pillow, openssl, requests, urllib3, certifi
Any help will be appreciated, thank you!
Code ex:
AsyncImage:
source: "giphy_s.gif"
on_release: root.stop_gif()
Error:
03-24 17:58:10.791 3662 3940 I python : [WARNING] [Image ] Unable to load image </data/user/0/test.picapp/files/app/_python_bundle/site-packages/kivy/data/images/image-loading.gif>
03-24 17:58:10.791 3662 3940 I python : [INFO ] [Base ] Leaving application in progress...
03-24 17:58:10.791 3662 3940 I python : Traceback (most recent call last):
03-24 17:58:10.791 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/app/main.py", line 9700, in <module>
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/app.py", line 855, in run
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/base.py", line 502, in runTouchApp
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/core/window/window_sdl2.py", line 730, in mainloop
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/core/window/window_sdl2.py", line 465, in _mainloop
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/base.py", line 340, in idle
03-24 17:58:10.801 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/base.py", line 325, in dispatch_input
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/base.py", line 291, in post_dispatch_input
03-24 17:58:10.811 3662 3940 I python : File "kivy/_event.pyx", line 707, in kivy._event.EventDispatcher.dispatch
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/uix/behaviors/button.py", line 179, in on_touch_up
03-24 17:58:10.811 3662 3940 I python : File "kivy/_event.pyx", line 703, in kivy._event.EventDispatcher.dispatch
03-24 17:58:10.811 3662 3940 I python : File "kivy/_event.pyx", line 1214, in kivy._event.EventObservers.dispatch
03-24 17:58:10.811 3662 3940 I python : File "kivy/_event.pyx", line 1098, in kivy._event.EventObservers._dispatch
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/lang/builder.py", line 64, in custom_callback
03-24 17:58:10.811 5070 5433 I Finsky : [375490] nlv.b(1): Triggered update for experiment package com.google.android.finsky.regular.
03-24 17:58:10.811 3662 3940 I python : File "<string>", line 1925, in <module>
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/app/main.py", line 9144, in open_emojis0
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/uix/behaviors/button.py", line 121, in __init__
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/uix/image.py", line 345, in __init__
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/uix/image.py", line 361, in _load_source
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/loader.py", line 474, in image
03-24 17:58:10.811 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/loader.py", line 184, in _get_loading_image
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/core/image/__init__.py", line 460, in load
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/core/image/__init__.py", line 223, in __init__
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/kivy/core/image/img_pil.py", line 102, in load
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/PIL/Image.py", line 2609, in open
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/PIL/Image.py", line 2599, in _open_core
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/PIL/ImageFile.py", line 102, in __init__
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/PIL/GifImagePlugin.py", line 88, in _open
03-24 17:58:10.821 3662 3940 I python : File "/home/kivy/Desktop/PicApp/.buildozer/android/platform/build/build/python-installs/picapp/PIL/GifImagePlugin.py", line 141, in _seek
03-24 17:58:10.821 3662 3940 I python : IOError: [Errno 22] Invalid argument
03-24 17:58:10.821 3662 3940 I python : Python for android ended.
Hello zen-code,
sorry for waiting so long.
I wanted 2 examples:
One is how to make an isometric or non isometric grid with kivi to build stuff on it.
One example is Simcity2000.
What i have in mind i a clone of the old outpost game which looks like this:
http://www.ibiblio.org/GameBytes/issue18/flooks/outpost2.gif
The other example is this:
https://play.google.com/store/apps/details?id=com.rnet.robominer how to make this with kivy?
Point out for what it is (as example you cannot draw an image on a layout)
It would be great if you could update PyCharm_kv_completion.jar to the latest v1.9.1 of Kivy :)
and even more awesome would be to update this page as well:
https://github.com/kivy/kivy/wiki/Setting-Up-Kivy-with-various-popular-IDE's
Because >=v1.9.1 doesn't use a kivy.bat anymore.
Thanks if you feel like doing it!
I just installed a fresh VM 0.5.
I cannot compile with the above error.
There is apparently a config issue with sdkmanager. I have not been able to figure out form my cli session how to change this.
Either give layout a background property or point at the layout page how to use the rectangle workaround to use rectangle with source (assuming people dont know normally you can do this)
I prefer to give it just a background property this should not be that hard.
Hei, i like to have an idea on how to move a figure or more figures around on a map.
Also i have looked you said you did explain the transformation thing on the scatter. I dont see where or how its explained :(
When using "PyCharm KV completion jar", ListView auto completes as Listview.
Kivy 2.0.0 already updated
Hope to keep updated
This is really useful.
Error: Fail to load plugin descriptor from file PyCharm_kv_completion.jar
I want to be happy again, quick fix pliiz :((
In Kivy.utils, there is an interpolate function. The "step" parameter seems meaningless and not useful? Also add a concrete example for using in animations.
It would be nice if someone could update/produce the jar on their side, could the source files be provided in the repository?
i feel bind should be better documentated:
http://kivy.org/docs/api-kivy.event.html?highlight=bind#kivy.event.EventDispatcher.bind
Lacks documentation how to use it in special situation.
http://kivy.org/docs/api-kivy.uix.slider.html?highlight=slider#
lets say i want to bind a value to the slider here:
sl.bind(value=snfcn)
nowhere in the documentation i can find the syntax how to actually use it.
But everyone who want to use a slider will want to bind a value to it.
I use this to ask questions here.
Right now my question would be:
How do i reopen something?
Idont see any button or anything.
It was pointed out that the animation for the StackLayout had misleading button captions. Suggested we removed them and replaced with multiple images.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.