#NEWLINE# def __init__( self , **kwargs ) : #NEWLINE# #INDENT# super ( MainView , self ) . __init__ ( ** data_items ) #NEWLINE# data_items = [ ] #NEWLINE# data_items . append ( DataItem ( 'One' ) ) #NEWLINE# data_items . append ( DataItem ( 'Two' ) ) #NEWLINE# data_items . append ( DataItem ( 'Three' ) ) #NEWLINE# list_item_args_converter = ( lambda row_index , obj : { #NEWLINE# #INDENT# 'text' : obj . name , #NEWLINE# 'size_hint_y' : None , #NEWLINE# 'height' : 25 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . list_adapter = ListAdapter ( data = data_items , args_converter = list_item_args_converter , selection_mode = 'single' , propagate_selection_to_data = False , allow_empty_selection = False , cls = ListItemButton ) #NEWLINE# self . list_view = ListView ( adapter = self . list_adapter ) #NEWLINE# self . add_widget ( self . list_view ) #NEWLINE# self . toggle = 'adding' #NEWLINE# Clock . schedule_interval ( self . update_list_data , 1 )