Mainstate: Apart from the standard states (like activity and visibility), each object can have a mainstate. You can define the mainstate with an xml-attribute: mainstate="state". "state" must be one of the supported boolean states of the object. If the mainstate is set (by default that's not the case), you can send events to the "mainstate" state. This allows you to hide the actually affected state in the event-listener, while the event-source just sends events. Note that this example is exactly like the standard case, but the event is sent to the main-state, which in turn is set to "visibility".