Affects Version/s: None
Titanium SDK 3.2.0 master
android sdk 4.1
device / simulator
Steps to reproduce
1. Run the sample code
2. Click on the button
3. It opens a window which contains a webview with a blue background. The webview is inside a scrollableview.
4. Upon opening you will see the webview being removed (strangely also the html content is still there …)
It took me a day to find out what was happening. The reason is that the scrollableView does not call setActivity on its views.
It matters in this sample because i close the first window when opening the second one.
So this is what happens:
- create win2
- create webview : activity set to current activity = activity of win
- open win2: setActivity called on the scrollableview but not its views
- createView is called on the webview. there the WebviewProxy add a LifeCycleEvent on it s activity which is the one from win
- close win: it s activity is destroyed WebviewProxy
- onDestroy is wrongly called on the WebviewProxy
Will add a PR