#NEWLINE# def mealitem_click( self , view , eventdata ) : #NEWLINE# #INDENT# if ( not self . view_day ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# position = int ( eventdata [ 'data' ] [ 'position' ] ) #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . dialogCreateAlert ( ( 'Do you want to delete the meal - ' + str ( self . show_meals_list [ position ] ) ) ) #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . dialogSetPositiveButtonText ( 'Yes' ) #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . dialogSetNegativeButtonText ( 'No' ) #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . dialogShow ( ) #NEWLINE# response = FullScreenWrapper2App . get_android_instance ( ) . dialogGetResponse ( ) . result #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . dialogDismiss ( ) #NEWLINE# try : #NEWLINE# #INDENT# if ( response [ 'which' ] == 'positive' ) : #NEWLINE# #INDENT# Calories . delete_entry ( self . show_meals_list [ position ] ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# self . update_todays_meals_list ( ) #NEWLINE# FullScreenWrapper2App . get_android_instance ( ) . makeToast ( 'Deleting...' )