mirror of https://github.com/kivy/kivy.git
Improved the kv example docs comment.
This commit is contained in:
parent
eb6463a368
commit
cd7febcbf8
|
@ -24,13 +24,14 @@ class MainView(GridLayout):
|
||||||
super(MainView, self).__init__(**kwargs)
|
super(MainView, self).__init__(**kwargs)
|
||||||
|
|
||||||
# Here we create a list adapter with some item strings, passing our
|
# Here we create a list adapter with some item strings, passing our
|
||||||
# CompositeListItemTemplate for the list item view, and then we
|
# CompositeListItem kv template for the list item view, and then we
|
||||||
# create a list view using this adapter. As we have not provided an
|
# create a list view using this adapter. As we have not provided an
|
||||||
# args converter, the default will be used. It will create, per
|
# args converter to the list adapter, the default args converter
|
||||||
# list item, an args dict with the text set to the data item (in
|
# will be used. It creates, per list item, an args dict with the
|
||||||
# this case a string label for an integer index), and two default
|
# text set to the data item (in this case a string label for an
|
||||||
# properties: size_hint_y=None and height=25. To customize, make
|
# integer index), and two default properties: size_hint_y=None and
|
||||||
# your own args converter and/or customize the kv template.
|
# height=25. To customize, make your own args converter and/or
|
||||||
|
# customize the kv template.
|
||||||
list_adapter = ListAdapter(data=[str(i) for i in xrange(100)],
|
list_adapter = ListAdapter(data=[str(i) for i in xrange(100)],
|
||||||
template='CustomListItem')
|
template='CustomListItem')
|
||||||
list_view = ListView(adapter=list_adapter)
|
list_view = ListView(adapter=list_adapter)
|
||||||
|
|
|
@ -229,13 +229,14 @@ To make a simple list with labels for 100 integers:
|
||||||
super(MainView, self).__init__(**kwargs)
|
super(MainView, self).__init__(**kwargs)
|
||||||
|
|
||||||
# Here we create a list adapter with some item strings, passing our
|
# Here we create a list adapter with some item strings, passing our
|
||||||
# CompositeListItemTemplate for the list item view, and then we
|
# CompositeListItem kv template for the list item view, and then we
|
||||||
# create a list view using this adapter. As we have not provided an
|
# create a list view using this adapter. As we have not provided an
|
||||||
# args converter, the default will be used. It will create, per
|
# args converter to the list adapter, the default args converter
|
||||||
# list item, an args dict with the text set to the data item (in
|
# will be used. It creates, per list item, an args dict with the
|
||||||
# this case a string label for an integer index), and two default
|
# text set to the data item (in this case a string label for an
|
||||||
# properties: size_hint_y=None and height=25. To customize, make
|
# integer index), and two default properties: size_hint_y=None and
|
||||||
# your own args converter and/or customize the kv template.
|
# height=25. To customize, make your own args converter and/or
|
||||||
|
# customize the kv template.
|
||||||
list_adapter = ListAdapter(data=[str(i) for i in xrange(100)],
|
list_adapter = ListAdapter(data=[str(i) for i in xrange(100)],
|
||||||
template='CustomListItem')
|
template='CustomListItem')
|
||||||
list_view = ListView(adapter=list_adapter)
|
list_view = ListView(adapter=list_adapter)
|
||||||
|
|
Loading…
Reference in New Issue