[TIMOB-2175] Removing a view from the middle of the ScollableView index causes an exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-18T23:10:57.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M03 |
Components | Android |
Labels | android, defect, removeview, scrollableview |
Reporter | Paul Dowsett |
Assignee | Don Thorp |
Created | 2011-04-15T03:12:45.000+0000 |
Updated | 2011-04-18T23:10:57.000+0000 |
Description
Please see this http://developer.appcelerator.com/question/72621/scrollableview-removeview-and-addview-behaviour-on-android"> Q&A for a description of the problem.
The following code demonstrates the issue. Run the script and click the first button - this is the workaround I have described in the Q&A. Then restart the script and click the second button to see the exception.
http://gist.github.com/641174">http://gist.github.com/641174
Note: This is definitely an issue on android. Need confirmation whether the same bug exists on IOS.
Normalized title.
(from [dccbb0c1e80fe8d292f53df641c3592b33d77bf2]) Merge branch 'master' of https://github.com/dizzymonkey/titanium_mobile">https://github.com/dizzymonkey/titanium_mobile [#937 state:fixed-in-qa] [#2175 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/dccbb0c1e80fe8d292f53df641c3592b33d77bf2"> https://github.com/appcelerator/titanium_mobile/commit/dccbb0c1e80f...
Assigning to Marshall since he validated and merged the patch. Also putting it in the milestone it was completed in.
Pass Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8) drillbit test Android Sim 1.6/2.1
android sim 1.6
https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups.com/a/appcelerator.com/android/screenshots/Screenshot2010-12-02at2.30.47AM.png?attachauth=ANoY7crKsfvMfdez3l27wnG_vOB0igXOd2AW8GVzP33R4KO4JNDSdg0wYeWx8OR34RLcQs0pfHxUiuoIsoVb5OClouqEI_CmWLRvbhD64WJg7KiGw4U6-679XjvXSqApaVCVyGqDjjfcHnceQepDqw0Wky44GDYZpomldZ1mAY0K0qqkI_BWhN2ETrFqCIPUjsjX6ZtLnuIJ5H1eYOg2P-M9OoYJKY6_TozjeA9AGUlbA3qoW-OTVh0%3D&attredirects=0"> https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...
android sim 2.1
https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups.com/a/appcelerator.com/android/screenshots/Screenshot2010-12-02at2.48.13AM.png?attachauth=ANoY7cqZMHs0_-0NFdd52s4sE13MK769EMBj1VEL9mkQdyPJ_1Lylg56ioZ3EKIhrSl7RMoVTCAI9cY4-jfDs6mOqdJOyP9mQrY28Zjh5vBQGQ6_377a21CU3cn9Al6-wi8damB2gpx5waY3FoILV9l9iIqifi6D5Jue3Rbig8yVLAwmls-q_qLFApWfmRmL9V7zuCx18cVF9-Om9uMmhzz7EKdEBj6cJ1MuzGF5vuOn6vTnexNmgr0%3D&attredirects=0"> https://5111068499667359260-a-appcelerator-com-s-sites.googlegroups...
There is still an issue when removing a selected view from a scrollableView on Android.
I added notes here: http://developer.appcelerator.com/question/72621/scrollableview-removeview-and-addview-behaviour-on-android#204798"> http://developer.appcelerator.com/question/72621/scrollableview-rem...
And code and test case here:
Sample code with 2 views and a scrollable view: http://pastie.org/1698526">http://pastie.org/1698526
To test this. Manually scroll the view to "View 1" the green one.
Then click on the button: "Remove View 1"
Expected result: The view gets removed and it scrolls back to view0. (this happens on iPhone)
On Android: The scrollableView remains blank, and there is no way to get back to view0.