#NEWLINE# def add_widget( self , view ) : #NEWLINE# #INDENT# if isinstance ( view , ContextualActionView ) : #NEWLINE# #INDENT# self . _stack_cont_action_view . append ( view ) #NEWLINE# if ( view . action_previous is not None ) : #NEWLINE# #INDENT# view . action_previous . unbind ( on_release = self . _emit_previous ) #NEWLINE# view . action_previous . bind ( on_release = self . _emit_previous ) #NEWLINE# #UNINDENT# self . clear_widgets ( ) #NEWLINE# super ( ActionBar , self ) . add_widget ( view ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( view , ActionView ) : #NEWLINE# #INDENT# self . action_view = view #NEWLINE# super ( ActionBar , self ) . add_widget ( view ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ActionBarException ( 'ActionBar can only add ContextualActionView or ActionView' )