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

iOS: View disappears from the listView when click on the listView row

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.1.2, Release 3.1.3, Release 3.2.0
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      iOS 7
      TiSDK 3.1.1GA, 3.1.2GA, 3.1.3.GA, 3.2.0CI

      Description

      In a listView, view disappears when click on some listView row.

      Steps to Reproduce
      1. Create a new Titanium project.

      2. Copy and paste the below code :

      var win = Ti.UI.createWindow({
      	backgroundColor : 'white'
      });
      var myTemplate = {
      	childTemplates : [{
      		type : 'Ti.UI.View',
      		bindId : 'pic',
      		properties : {
      			width : '15dp',
      			height : '15dp',
      			left : 5,
      			backgroundColor : 'red'
      		}
      	}, {
      		type : 'Ti.UI.Label',
      		bindId : 'info',
      		properties : {
      			color : 'black',
      			font : {
      				fontFamily : 'Arial',
      				fontSize : '20dp',
      				fontWeight : 'bold'
      			},
      			left : '60dp',
      			top : 0,
      		}
      	}, {
      		type : 'Ti.UI.Label',
      		bindId : 'es_info',
      		properties : {
      			color : 'gray',
      			font : {
      				fontFamily : 'Arial',
      				fontSize : '14dp'
      			},
      			left : '60dp',
      			top : '25dp',
      		}
      	}]
      };
       
      var listView = Ti.UI.createListView({
      	templates : {
      		'template' : myTemplate
      	},
      	defaultItemTemplate : 'template'
      });
      var sections = [];
       
      var fruitSection = Ti.UI.createListSection({
      	headerTitle : 'Fruits / Frutas'
      });
      var fruitDataSet = [{
      	info : {
      		text : 'Apple'
      	},
      	es_info : {
      		text : 'Manzana'
      	}
      }, {
      	info : {
      		text : 'Banana'
      	},
      	es_info : {
      		text : 'Banana'
      	}
      }];
      fruitSection.setItems(fruitDataSet);
      sections.push(fruitSection);
       
      var vegSection = Ti.UI.createListSection({
      	headerTitle : 'Vegetables / Verduras'
      });
      var vegDataSet = [{
      	info : {
      		text : 'Carrot'
      	},
      	es_info : {
      		text : 'Zanahoria'
      	}
      }, {
      	info : {
      		text : 'Potato'
      	},
      	es_info : {
      		text : 'Patata'
      	}
      }];
      vegSection.setItems(vegDataSet);
      sections.push(vegSection);
       
      var grainSection = Ti.UI.createListSection({
      	headerTitle : 'Grains / Granos'
      });
      var grainDataSet = [{
      	info : {
      		text : 'Corn'
      	},
      	es_info : {
      		text : 'Maiz'
      	}
      }, {
      	info : {
      		text : 'Rice'
      	},
      	es_info : {
      		text : 'Arroz'
      	}
      }];
      grainSection.setItems(grainDataSet);
      sections.push(grainSection);
       
      listView.setSections(sections);
      win.add(listView);
      win.open();
      

      3. Run it on iOS7 simulator/device and tap on some row of a listView.

      Expected Behavior : The view should appears even on clicking the row.

      Actual behavior : The 'Red' view disappeared from the listView row on click.

      Note : Please find the attached screenshot of the actual behavior.

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              mpathak Meenakshi Pathak
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code