Module fullscreenwrapper2 :: Class itemclick_EventHandler
[hide private]
[frames] | no frames]

Class itemclick_EventHandler

source code

  object --+    
           |    
EventHandler --+
               |
              itemclick_EventHandler

predefined itemclick event handler for use with Views

This is the event handler to typically associate with ListView. You only need to pass the ListView to link the itemclick event to & the handler function & rest of event handler initialization is handled automatically

Instance Methods [hide private]
 
__init__(self, view, handler_function=None)
creates an SL4A event handler
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

    Inherited from EventHandler
 
__str__(self)
convenience function for debugging
source code
 
match_event_data(self, event_data)
Provides a matching function to compare event handler vs.
source code
Class Variables [hide private]
  EVENT_NAME = 'itemclick'
  COMPARE_ATTRIBUTE = 'id'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, view, handler_function=None)
(Constructor)

source code 

creates an SL4A event handler

SL4A eventdata returned by Android.eventWait() or Android.eventPoll().result in general take the form of a dict: {"data":{"attribute1":value,"attribute2":value}, "name":"event_name", "time":eventtime}

The EventHandler object consists of an event_name, a compare_attribute to look for within the "data" dict & a compare_value which the compare_attribute will get matched against. It also has optionally an event_handler_fn which stores a reference to the method to be called and the reference to the view referred to by the event.

The compare_attribute can be None. if this is the case, then the event_name alone is matched. You can use this feature to catch other SL4A API events like sensor events

Overrides: object.__init__
(inherited documentation)