Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18201] iOS: subtitles in Listview gets overlapped with the titles in the next row

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2016-10-04T17:22:59.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0
ReporterVisalakshi Chidambaram
AssigneeHans Knöchel
Created2014-12-15T09:48:08.000+0000
Updated2017-03-24T17:58:56.000+0000

Description

This is not a regression as it can also be reproduced with titanium sdk 3.4.1 The sub info in the first row gets overlapped with the info in the next line in listview. Clicking on the row causes the sub info that overlapped to disappear and re-appear after some time. However, this works fine with android. Steps to reproduce: 1. Run the attached app.js 2. Observe the info 3. Click on the row : "" Actual Results: 2. The sub info gets overlapped with the info in the next line as shown in the attached screen shot 3. The sub info that overlapped with the info in the line disappears and reappears again after some time Expected Results: 2. No overlap of the text found in the list view. The sub info and info should be clearly visible. 3. The sub info should not disappear.

Attachments

FileDateSize
app.js2014-12-15T09:48:08.000+00003795
textOverlap.PNG2014-12-15T09:48:08.000+0000301326

Comments

  1. Hans Knöchel 2016-10-04

    The test-case was invalid (rows too small for the subtitle-margins, html-property not applicable). Updated and minified test-case:
       
        
       //
       // create base UI tab and root window
       //
       var _window = Titanium.UI.createWindow({  
       });
       
       
       var myTemplate = {
           childTemplates: [                   //
               {                            // Title
                   type: 'Ti.UI.Label',     // Use a label for the title
                   bindId: 'info',          // Maps to a custom info property of the item data
                   properties: {            // Sets the label properties
                       color: 'black',
                       font: { fontFamily:'Arial', fontSize: '18dp', fontWeight:'bold' },
                       left: 60, top: 0,
       				height: 20
                   }
               },
               {                            // Subtitle
                   type: 'Ti.UI.Label',     // Use a label for the subtitle
                   bindId: 'es_info',       // Maps to a custom es_info property of the item data
                   properties: {            // Sets the label properties
                       color: 'gray',
                       font: { fontFamily:'Arial', fontSize: '14dp' },
                       left: 60, bottom: 5
                   }
               }
           ]
       };
           
       var listView = Ti.UI.createListView({
           // Maps myTemplate dictionary to 'template' string
           templates: { 'template': myTemplate },
           // Use 'template', that is, the myTemplate dict created earlier
           // for all items as long as the template property is not defined for an item.
           defaultItemTemplate: 'template'
       });
       var sections = [];
           
       var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});
       var fruitDataSet = [
           { info: {text: "<a href='http://google.com'>http://google.com<;/a>"}, es_info: {text: 'Manzana'}},
           { info: {text: "Banana\t http://en.wikipedia.org/wiki/Banana"}, es_info: {text: 'Banana'}},
           { info: {text: "Pineapple\t http://en.wikipedia.org/wiki/Pineapple"}, es_info: {text: 'Pina'}},
           { info: {text: "Peach \thttp://en.wikipedia.org/wiki/Peach"}, es_info: {text: 'Durazno'}},
           { info: {text: "Apple\t http://en.wikipedia.org/wiki/Apple"}, es_info: {text: 'Manzana'}},
           { info: {text: "Banana\t http://en.wikipedia.org/wiki/Banana"}, es_info: {text: 'Banana'}},
           { info: {text: "Pineapple\t http://en.wikipedia.org/wiki/Pineapple"}, es_info: {text: 'Pina'}},
           { info: {text: "Peach \thttp://en.wikipedia.org/wiki/Peach"}, es_info: {text: 'Durazno'}}
       ];
       fruitSection.setItems(fruitDataSet);
       sections.push(fruitSection);
           
       var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables / Verduras'});
       var vegDataSet = [
           { info: {text: 'Carrot\thttp://en.wikipedia.org/wiki/Carrot'}, es_info: {text: 'Zanahoria'}},
           { info: {text: 'Potato\thttp://en.wikipedia.org/wiki/Potato'}, es_info: {text: 'Patata'}},
           { info: {text: 'Carrot\thttp://en.wikipedia.org/wiki/Carrot'}, es_info: {text: 'Zanahoria'}},
           { info: {text: 'Potato\thttp://en.wikipedia.org/wiki/Potato'}, es_info: {text: 'Patata'}},
       ];
       vegSection.setItems(vegDataSet);
       sections.push(vegSection);
           
       var grainSection = Ti.UI.createListSection({ headerTitle: 'Grains / Granos'});
       var grainDataSet = [
           { info: {text: "Corn\t http://en.wikipedia.org/wiki/Maiz"}, es_info: {text: 'Maiz'}},
           { info: {text: "Rice\t http://en.wikipedia.org/wiki/Rice"}, es_info: {text: 'Arroz'}},
           { info: {text: "Wheat\t http://en.wikipedia.org/wiki/Wheat"}, es_info: {text: 'Trigo'}},
           { info: {text: "Corn\t http://en.wikipedia.org/wiki/Maiz"}, es_info: {text: 'Maiz'}},
           { info: {text: "Rice\t http://en.wikipedia.org/wiki/Rice"}, es_info: {text: 'Arroz'}},
           { info: {text: "Wheat\t http://en.wikipedia.org/wiki/Wheat"}, es_info: {text: 'Trigo'}}
       ];
       grainSection.setItems(grainDataSet);
       sections.push(grainSection);
           
       listView.setSections(sections);
       _window.add(listView);
        _window.open();
       
  2. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source