Skip to content

Instantly share code, notes, and snippets.

@geojeff
Created September 13, 2013 13:50
Show Gist options
  • Save geojeff/6550993 to your computer and use it in GitHub Desktop.
Save geojeff/6550993 to your computer and use it in GitHub Desktop.
<ThumbnailedListItem@SelectableView+BoxLayout>:
index: root.index
text: root.text if root.text else ''
size_hint_y: root.size_hint_y
height: root.height
carry_selection_to_children: True
Image
source: "fruit_images/{0}.32.jpg".format(root.text) if root.text else ''
ListItemButton:
index: root.index
text: root.text if root.text else ''
on_release: self.parent.trigger_action(duration=0)
...
ListView:
id: fruits_list_view
args_converter: app.list_item_args_converter
selection_mode: 'single'
allow_empty_selection: False
size_hint: .2, 1.0
item_view_cls: 'ThumbnailedListItem'
Binding:
source: app.current_fruits_controller
prop: 'data'
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment