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

Android: Section header views are redrawn when a TabGroup is used

    Details

      Description

      Problem

      We are getting this issue only once when the orientation of the Window changes in the tabGroup.

      Tested on

      Droid Razr 2.3.5

      Expected behavior

      It looks like if a single window is used, issue does not happens.

      Additional details

      To try out please uncomment line near the very bottom instead of open the tabGroup:

      //contactusWindow.open();

      Issues does not seem to occur in iOS

      Current behavior

      Section header Views swapping issues

      Steps to reproduce

      1. Run sample
      2. Press tab 2.
      3. Change orientation from portrait to landscape.
      4. Change it back.
      5. the second tableViewSections disappears.

      *Notice how the first 2 tableViewSections are "gone"* (or at least redrawn).

      Repro sequence

      var tabGroup = Titanium.UI.createTabGroup();
       var win1 = Titanium.UI.createWindow({});
      var tab1 = Titanium.UI.createTab({
          title : 'Tab 1',
          window : win1
      }); 
       var contactusWindow = Titanium.UI.createWindow({
          title : 'Contact',
          backgroundColor : 'white'
      });
      var contactDataInput = []; 
      var contactHeaderLabel = Ti.UI.createLabel({
          text : 'GeoBlue Expats',
          left : '3%',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#373737'
      });
       
      var contactSummaryHeaderView = Ti.UI.createView({
          backgroundGradient : {
              type : 'linear',
              startPoint : {
                  x : '0%',
                  y : '50%'
              },
              endPoint : {
                  x : '0%',
                  y : '100%'
              },
              colors : [{
                  color : '#C5CDD0',
                  offset : 0.0
              }, {
                  color : '#BFC7CB',
                  offset : 0.05
              }]
          },
          height : 25
      });
      contactSummaryHeaderView.add(contactHeaderLabel);
       
      var contactSummarySection = Ti.UI.createTableViewSection({
          headerView : contactSummaryHeaderView
      });
       
      var contactExpatRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : 'transparent',
          backgroundSelectedColor : 'transparent'
      });
       
      contactExpatRow.add(Ti.UI.createLabel({
          text : 'Customer Service for GeoBlue Expatriates.',
          left : '3%',
          font : {
              fontSize : 14
          },
          color : 'black'
      }));
       
      var contactInsideUSLabel = Ti.UI.createLabel({
          text : '+1.855.282.3517(Inside the US)',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#06465D'
      });
       
      var contactInsideUSRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : '#4CA4BB',
          backgroundSelectedColor : '#4CA4BB'
      });
      contactInsideUSRow.add(contactInsideUSLabel);
       
      var contactOutsideUSLabel = Ti.UI.createLabel({
          text : '+1.610.254.5304(Outside the US)',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#06465D'
      });
       
      var contactOutsideUSRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : '#4CA4BB',
          backgroundSelectedColor : '#4CA4BB'
      });
      contactOutsideUSRow.add(contactOutsideUSLabel);
       
      contactSummarySection.add(contactExpatRow);
      contactSummarySection.add(contactInsideUSRow);
      contactSummarySection.add(contactOutsideUSRow);
      contactDataInput.push(contactSummarySection);
      var contactTravelerSection;
       
      var contactTrvlrHeaderLbl = Ti.UI.createLabel({
          text : 'GeoBlue Travelers',
          left : '3%',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#373737'
      });
       
      var contactTrvlrHeaderView = Ti.UI.createView({
          backgroundGradient : {
              type : 'linear',
              startPoint : {
                  x : '0%',
                  y : '50%'
              },
              endPoint : {
                  x : '0%',
                  y : '100%'
              },
              colors : [{
                  color : '#C5CDD0',
                  offset : 0.0
              }, {
                  color : '#BFC7CB',
                  offset : 0.05
              }]
          },
          height : 25
      });
      contactTrvlrHeaderView.add(contactTrvlrHeaderLbl);
       
      contactTravelerSection = Ti.UI.createTableViewSection({
          headerView : contactTrvlrHeaderView
      });
       
      var contactTrvlrRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : 'transparent',
          backgroundSelectedColor : 'transparent'
      });
      contactTrvlrRow.add(Ti.UI.createLabel({
          text : 'Customer Service for GeoBlue Travelers.',
          left : '3%',
          font : {
              fontSize : 14
          },
          color : 'black'
      }));
       
      var contactTrvlrInsideUSLbl = Ti.UI.createLabel({
          text : '+1.888.412.6403(Inside the US)',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#06465D'
      });
       
      var contactTrvlrInsideUSRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : '#4CA4BB',
          backgroundSelectedColor : '#4CA4BB'
      });
      contactTrvlrInsideUSRow.add(contactTrvlrInsideUSLbl);
       
      var contactTrvlrOutsideUSLbl = Ti.UI.createLabel({
          text : '+1.610.254.5830(Outside the US)',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#06465D'
      });
       
      var contactTrvlrOutsideUSRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : '#4CA4BB',
          backgroundSelectedColor : '#4CA4BB'
      });
      contactTrvlrOutsideUSRow.add(contactTrvlrOutsideUSLbl);
       
      contactTravelerSection.add(contactTrvlrRow);
      contactTravelerSection.add(contactTrvlrInsideUSRow);
      contactTravelerSection.add(contactTrvlrOutsideUSRow);
      contactDataInput.push(contactTravelerSection);
      var contactFeedbackSection;
       
      var contactFeedbackHeaderLabel = Ti.UI.createLabel({
          text : 'Feedback',
          left : '3%',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#373737'
      });
       
      contactFeedbackHeaderView = Ti.UI.createView({
          backgroundGradient : {
              type : 'linear',
              startPoint : {
                  x : '0%',
                  y : '50%'
              },
              endPoint : {
                  x : '0%',
                  y : '100%'
              },
              colors : [{
                  color : '#C5CDD0',
                  offset : 0.0
              }, {
                  color : '#BFC7CB',
                  offset : 0.05
              }]
          },
          height : 25
      });
      contactFeedbackHeaderView.add(contactFeedbackHeaderLabel);
       
      contactFeedbackSection = Ti.UI.createTableViewSection({
          headerView : contactFeedbackHeaderView
      });
       
      var contactFeedbackRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          layout : 'vertical',
          height : Ti.UI.SIZE,
          backgroundColor : 'white',
          selectedBackgroundColor : 'transparent',
          backgroundSelectedColor : 'transparent'
      });
      contactFeedbackRow.add(Ti.UI.createLabel({
          text : 'To provide feedback, recommend enhancements, or to notify GeoBlue of issues or concerns regarding your mobile app, please email us directly at:',
          left : '3%',
          font : {
              fontSize : 14
          },
          color : 'black'
      }));
       
      var contactEmailLabel = Ti.UI.createLabel({
          text : 'mobileapps@geo-blue.com',
          font : {
              fontSize : 14,
              fontWeight : 'bold'
          },
          color : '#06465D'
      });
       
      var emailRow = Ti.UI.createTableViewRow({
          width : Ti.UI.FILL,
          backgroundColor : 'white',
          selectedBackgroundColor : '#4CA4BB',
          backgroundSelectedColor : '#4CA4BB'
      });
      emailRow.add(contactEmailLabel);
       
      contactFeedbackSection.add(contactFeedbackRow);
      contactFeedbackSection.add(emailRow);
      contactDataInput.push(contactFeedbackSection);
       
      var tableViewOptions = {
          minRowHeight : 50,
          separatorColor : 'black',
          backgroundImage : 'none'
      };
       
      var contactusTable = Ti.UI.createTableView(tableViewOptions);
       
      contactusTable.setData(contactDataInput);
       
      contactusWindow.add(contactusTable);
       
      var homeTab = Titanium.UI.createTab({
          icon : 'KS_nav_ui.png',
          title : 'Tab 2',
          window : contactusWindow
      });
       
      tabGroup.addTab(tab1);
      tabGroup.addTab(homeTab);
       
      tabGroup.open();
      

      Customer remarks

      we observed this issue in HTC Sensation OS 2.3.4, Samsung Galaxy S2 OS 4.0.3, Sony Xperia OS 4.0.4.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                egomez Eduardo Gomez (Inactive)
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-15263
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code