This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_args_converter(row_index, rec): | |
dict = {'text': '', | |
'index': rec[4], | |
'is_selected': rec.is_selected, | |
'padding_x': 100, | |
'halign': 'left', | |
'size_hint_y': None, | |
'cls_dicts': [{'cls': ImageButton, 'kwargs': {'source': '/home/clyde/' + rec[3], 'index': rec[4], 'size_hint': (.175,1), | |
'border_color': [0,0,0,1], 'deselected_color': [3,0,0,1], 'selected_color': [0, 6,.0,1], 'on_release' : callback}}, | |
{'cls': ListItemLabel, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def callback(instance): | |
global names | |
global missing | |
global missinglist | |
names[instance.masterIndex].is_selected = not(names[instance.masterIndex].is_selected) | |
print names[instance.masterIndex].is_selected, names[instance.masterIndex] | |
for item in missing: | |
if names[instance.masterIndex] in missing: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_args_converter(row_index, rec): | |
dict = {'text': '', | |
'index': rec[4], | |
'is_selected': rec.is_selected, | |
'padding_x': 100, | |
'halign': 'left', | |
'size_hint_y': None, | |
'cls_dicts': [{'cls': ImageButton, 'kwargs': {'source': rec[3], 'masterIndex': rec[4], 'size_hint': (.175,1), | |
'border_color': [0,0,0,1], 'deselected_color': [3,0,0,1], 'selected_color': [0, 6,.0,1], 'is_selected': rec.is_selected,'on_release' : callback}}, | |
{'cls': MyListItemLabel, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I/python (10499): Android kivy bootstrap done. __name__ is __main__ | |
I/python (10499): Run user program, change dir and execute main.py | |
I/python (10499): [INFO ] Kivy v1.8.0-dev | |
I/python (10499): [INFO ] [Logger ] Record log in /data/data/org.test.myapp/files/.kivy/logs/kivy_13-11-11_4.txt | |
I/python (10499): [INFO ] [Factory ] 156 symbols loaded | |
I/python (10499): [DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s | |
I/python (10499): [DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones | |
I/python (10499): /data/data/org.test.myapp/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:12: RuntimeWarning: import cdrom: No module named cdrom | |
I/python (10499): (ImportError: No module named cdrom) | |
I/python (10499): [INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if i use this loop outside of def build(self): i get this: kivy.factory.FactoryException: Unknown class <TravelerBtn> | |
if i change the widget in the for loop to 'Button,' i get 24 buttons in the stacklayout with the propertext. | |
if i use the loop within 'def build (self):', i can't set the text value of the <TravelerBtn> instances. | |
def build (self): | |
for i in range(25): | |
i = Factory.TravelerBtn(text =str(i)) | |
rootwidget.add_widget(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install distribute | |
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python' | |
# Cwd /home/clyde/buildozer/.buildozer | |
/bin/sh: 1: curl: not found | |
# Install requirement datetime in virtualenv | |
# Run 'pip-2.7 install --download-cache=/home/clyde/.buildozer/cache --target=/home/clyde/buildozer/.buildozer/applibs datetime' | |
# Cwd /home/clyde/buildozer/.buildozer | |
Traceback (most recent call last): | |
File "/home/clyde/buildozer/.buildozer/venv/bin/pip-2.7", line 5, in <module> | |
from pkg_resources import load_entry_point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clyde@clyde-N55SF:/home/kivy$ sudo make | |
python setup.py build_ext --inplace | |
[INFO ] Kivy v1.8.0-dev | |
Found GLES 2.0 headers at /usr/include/GLES2/gl2.h | |
running build_ext | |
Build configuration is: | |
* use_opengl_es2 = True | |
* use_sdl = False | |
* use_glew = False | |
* use_rpi = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I/python (14371): File "/home/clyde/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/uix/textinput.py", line 1009, in on_focus | |
I/python (14371): File "/home/clyde/buildozer/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py", line 378, in request_keyboard | |
I/python (14371): File "_android.pyx", line 190, in android._android.show_keyboard (android/_android.c:2286) | |
I/python (14371): TypeError: show_keyboard() takes exactly 2 positional arguments (0 given) | |
I/python (14371): Python for android ended. | |
I/AndroidRuntime(14371): VM exiting with result code 0, cleanup skipped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mylistobj.adapter = ListAdapter(data= sorted([item[0]+','+ item[1] for item in missing]), args_converter= args_conv, cls= ListItemButton) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kivy | |
kivy.require('1.8.0') | |
from kivy.app import App | |
from kivy.uix.widget import Widget | |
from kivy.uix.camera import Camera | |
from kivy.uix.button import Button | |
from kivy.core.window import Window | |
class MyApp(App): |