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

Only first Image is showing on a tableview when taking a picture from camera

    Details

      Description

      Taking picture from the camera and adding new row with the picture to a tableview shows only the first one.

      Steps to reproduce:

      var win = Ti.UI.createWindow({
              title : 'image test',
              layout : 'vertical'
      });
       
      var btn = Ti.UI.createButton({
      	title : 'take picture'
      });
      btn.addEventListener('click',function(e){
      	Ti.Media.showCamera({
      		success : function(o) {
      		   var row = Ti.UI.createTableViewRow({
                             className : 'img'
      		   });
      		   row.add(Ti.UI.createImageView({
      			image : o.media
      		   }));
      		   tv.appendRow(row);
      		}
      	});
      });
      win.add(btn);
       
      var tv = Ti.UI.createTableView({});
      win.add(tv);
       
      win.open();
      
      

      Expected result:

      once a picture is taken, a new row should be added with that image.

      Actual result:

      A row is added but only the first row shows an image.

      Important:

      I tried this also on a listview and a scrollview also I changed from o.media to o.media.nativePath but nevermind the combination all had the same unfortunate result of showing only the first image.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ayeung Allen Yeung
                Reporter:
                nadavh Nadav Hoze
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code