calatrava/calatrava — pull request #76 by priyaaank (2013-06-01 15:04:58+00:00)
Title: Made changes to enable render for Native Android views

Currently Android bridge worked with WebViewActivites only. This was primarily because the native pages were not registered or deregistered. Also events to indicate wether page was on screen or off screen were not published.

Extraction of this logic as common is tricky in inheritance chain, since in WebViewActivity "OnScreen" call depends on WebView readiness callback, while it's called as part of onResume for Registered Activity.

I have made changes to WebViewActivity and RegisteredActivty to ensure that render is called in android for views that are implemented natively, by creating corresponding state managers which are initialized in parent onCreate. They have android activity lifecycle hooks to do the processing.

I think this code can be structured better. But at this point I want to get it working. I'd be happy to refine it. Do comment with suggestions/approaches to design this better.