Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5996] Android: Modify ScrollableView.removeView() to support integer indexes

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-05-09T21:31:17.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sRelease 7.3.0
ComponentsAndroid
Labelsandroid, parity, scrollableview, tbs-2.1.0
ReporterDawson Toth
AssigneeJoshua Quick
Created2011-11-04T12:48:25.000+0000
Updated2018-06-26T18:05:11.000+0000

Description

Feature

On iOS, ScrollableView's "removeView" method accepts either a view or an index to a view. Android only supports passing in a view.

Solution

We need to either remove the undocumented feature from iOS, or add it to Android and to the documentation.

How To Reproduce

Drop the following in an app.js. If you get a modal error screen or an error in the log, the feature is not present. If you don't, then everything is working as it should.
Ti.UI.createScrollableView({
    views: [ Ti.UI.createView() ]
}).removeView(0);

Comments

  1. jithinpv 2013-11-10

    Anvil test case added. https://github.com/appcelerator/titanium_mobile/pull/4943
  2. Biju pm 2014-01-17

       
       var win = Ti.UI.createWindow({
         backgroundColor: 'white',
         exitOnClose: true,
         fullscreen: false,
         title: 'ScrollView Demo'
       });
       
       var scrollableView= Ti.UI.createScrollableView({
         contentWidth: 'auto',
         contentHeight: 'auto',
         showVerticalScrollIndicator: true,
         showHorizontalScrollIndicator: true,
         height: '80%',
         width: '80%'
       });
       var view = Ti.UI.createView({
         backgroundColor:'#336699',
         borderRadius: 10,
         top: 10,
         height: 2000,
         width: 1000
       });
       scrollableView.add(view);
       scrollableView.removeView(0); // using integer
       // scrollableView.removeView(view); //  using view 
       win.add(scrollableView);
       win.open();
       
  3. Biju pm 2014-01-17

    PR:- https://github.com/appcelerator/titanium_mobile/pull/5235 *[This PR has been declined.]*
  4. Joshua Quick 2018-01-06

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9696
  5. Lokesh Choudhary 2018-05-05

    FR Passed. Waiting for merger to be enabled.
  6. Lokesh Choudhary 2018-05-09

    PR Merged.
  7. Josh Longton 2018-06-26

    *Closing ticket.* The fix is present in SDK: {noformat} 7.3.0.v20180626064422 {noformat}

JSON Source