added listener methods to the main view container and an example in the demo app