[TIMOB-28503] Android: ScrollableView UI does not render any more (10.0.1 regression)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-08-05T16:33:49.000+0000 |
Affected Version/s | Release 10.0.1 |
Fix Version/s | Release 10.0.2 |
Components | Android |
Labels | android, regression, scrollableview |
Reporter | Hans Knöchel |
Assignee | Joshua Quick |
Created | 2021-07-05T08:41:33.000+0000 |
Updated | 2021-08-05T16:33:49.000+0000 |
Description
I still need to pinpoint the exact cause of the issue, but our home screen scrollable-view does not render any more when using the 10.0.1 build. It seems to work sometimes but fails sporadically. -Note: This is an unreleased version, so it's not critical and can be fixed prior to the release.- Just noticed that 10.0.1 was released yesterday. Then this should really be fixed timely :-)
[~hknoechel], I did notice a regression and wrote it up here: [TIMOB-28504] Not sure if this is your issue, but it's the only bug I've found.
This is still an issue with latest 10_0_X. It is reproducible in our project (I think both you and Gary have access).
Have the same issue with 10.0.1.GA and 10.1.0. Looks like
addView
is not working 10.0.0.GA: !https://www.migaweb.de/ti_102.png! 10.0.1.GA: !https://www.migaweb.de/ti_101.png! using:Tried insertViewsAt too but still nothing
I'm attempting to create a reproducible test case, but can't reproduce the issue
How is the scrollableView nested, are the views added before its parent view is visible?
I'm able to reproduce this issue via [~hknoechel] app. I haven't figured out how to reproduce this issue via my own Classic app project yet. So, I had to rig [~hknoechel] Titanium app to be debuggable with the "titanium_mobile" SDK and Android _Studio (don't ask me how; it took me an hour and it was a pain to set up :P )_. The issue is that views added after creation, but before the native view is created, can cause all of the added views to be removed when displayed. This is because the proxy is set up to add views via methods (ie: addView(), setViews(), etc.)... but the native view still reads the "views" property which will be empty/null and end up remove all native child views that were already created. https://github.com/appcelerator/titanium_mobile/blob/c7453230993e5d6a5a9cab3461737f8f58e86622/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIScrollableView.java#L385-L387
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12989
-not tested the PR yet- but a simple timeout to wait until the window is open worked so I guess your fix is correct - but I'll test it soon! *Update:* PR works fine in my app Still would be interested in the Studio debug SDK ;)
Test code:
Merged to master and 10_0_X