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

Android: ListView disappears after activity is recreated

    Details

      Description

      Try the following on both 3.5.0 and 3.3.0.GA
      1. Check "Do not keep activities" in developer options
      2. Open and close window 2
      3. On 3.5.0 the ListView disappears when we come back from window 2
      4. Note that the button does not disappear, so the problem seems specific to listview.

      var listView = Ti.UI.createListView();
      var sections = [];
       
      var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
      var data = [];
      for (var i = 0; i < 2; i++) {
      	data.push({properties: { title: 'row ' + i, color: 'white', font: {fontSize: '15dp'}}});
      }
      fruitSection.setItems(data);
      sections.push(fruitSection);
      listView.sections = sections;
       
      var win1 = Ti.UI.createWindow({title : 'TW1',backgroundColor:'blue'});
      win1.add(listView);
       
      var win2 = Ti.UI.createWindow({title: 'Window 2'});
       
      var openWindowButton = Ti.UI.createButton({title:'Open window2'});
      win1.add(openWindowButton);
       
      var closeWindowButton = Ti.UI.createButton({width:Ti.UI.SIZE,height:Ti.UI.SIZE,title:'Close window2'});
      win2.add(closeWindowButton);
       
      openWindowButton.addEventListener('click',function(e){win2.open();});
      closeWindowButton.addEventListener('click',function(e){win2.close();});
       
      win1.open();
      

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              mokesmokes Mark Mokryn
              Tester:
              Lokesh Choudhary
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration