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
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
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
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
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': '/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
for cls_dict in kwargs['cls_dicts']: | |
cls = cls_dict['cls'] | |
cls_kwargs = cls_dict.get('kwargs', None) | |
if cls_kwargs: | |
cls_kwargs['index'] = index | |
cls_kwargs['is_selected'] = is_selected | |
if 'selection_target' not in cls_kwargs: | |
cls_kwargs['selection_target'] = self |
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
class MyCompositeListItem(CompositeListItem): | |
def __init__(self, **kwargs): | |
super(MyCompositeListItem, self).__init__(**kwargs) | |
is_selected = kwargs['is_selected'] | |
########## | |
def my_args_converter(row_index, rec): | |
dict = {'text': '', | |
'is_selected': rec.is_selected, |
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
class MyCompositeListItem(ButtonBehavior, CompositeListItem): | |
bind_selection_from_children = BooleanProperty(True) | |
def __init__(self, **kwargs): | |
super(MyCompositeListItem, self).__init__(**kwargs) | |
ButtonBehavior.__init__(self, **kwargs) | |
# There is an index to the data item this composite list item view | |
# represents. Get it from kwargs and pass it along to children in the |
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
class MyCompositeListItem(ButtonBehavior, CompositeListItem): | |
bind_selection_from_children = BooleanProperty(True) | |
def __init__(self, **kwargs): | |
super(MyCompositeListItem, self).__init__(**kwargs) | |
# There is an index to the data item this composite list item view | |
# represents. Get it from kwargs and pass it along to children in the | |
# loop below. |