Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28240

Android: TableViewRow unable to change colour of row after a set time (Regression)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: Release 9.3.0
    • Fix Version/s: Release 9.3.0
    • Component/s: Android
    • Labels:
      None
    • Environment:

      MacOS Big Sur: 11.0 Beta 9
      Xcode: 12.2 Beta
      Java Version: 1.8.0_242
      Android NDK: 21.3.6528147
      Node.js: 12.18.1
      ""NPM":"5.0.0","CLI":"8.1.1""
      iphone 11 (14.2) Sim
      PIXEL XL 10.0 Emulator

      Description

      Note* This error is only seen in the following PR https://github.com/appcelerator/titanium_mobile/pull/12029

      Table view rows colour does not disappear after a few seconds but on 9.2.2.GA and iOS it does.

      Test Case:

      var win = Ti.UI.createWindow();
       
      var myTableView = Ti.UI.createTableView();
       
      var row = Ti.UI.createTableViewRow({
      	height:80,
      	backgroundColor:'#c00',
      });
       
      myTableView.appendRow(row);
       
      win.add(myTableView);
       
      win.addEventListener('open',function(){
      	setTimeout(function(){
      		Ti.API.debug(JSON.stringify(myTableView));
      		var tableRows = myTableView.data[0].rows;
      		Ti.API.debug(JSON.stringify(tableRows));
      		tableRows.pop(); // returns the error org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object.
      		myTableView.data = tableRows;
      	},2000); // two seconds after the window opens, remove the red row
      });
       
      /* you can swap out the open event listener with this one to see my alternative also fail
      win.addEventListener('open',function(){
      	setTimeout(function(){
      		Ti.API.debug(JSON.stringify(myTableView));
      		var tableRows = myTableView.sections[0].rows; // returns the error Message: Java class "java.util.ArrayList" has no public instance field or method named "0".
      		Ti.API.debug(JSON.stringify(tableRows));
      		tableRows.pop();
      		myTableView.data = tableRows;
      	},2000); // two seconds after the window opens, remove the red row
      });
      */
       
      win.open();
      

      Test Steps:

      1. Create a Ti application
      2. Add the code above into the application
      3. Run the app

      Expected result
      Row should go from red to white after a few seconds.

      Actual result
      Row colour does not change.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              smohammed Samir Mohammed
              Tester:
              Lokesh Choudhary
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration