Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14771] BlackBerry: Cannot add view to tableViewRow

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2013-08-07T18:47:04.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsBlackBerry
Labelsblackberry, parity
ReporterMritunjay Singh
AssigneePedro Enrique
Created2013-08-05T11:22:46.000+0000
Updated2017-03-14T21:08:39.000+0000

Description

*Problem* Nothing happens when I try to add a View to TableViewRow. Also, I want to show Image in imageView through a URL, but that's not showing either. *Note* It works with iOS and Android. *Test case* Use the following, not the attachment:
// My Questions are added in Comment. There are 2 Questions.
// This is working with iOS and Android. not working with BB10
var tableData = [];

var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var table = Ti.UI.createTableView({
	objName : 'table'
});

for (var i = 0; i <= 20; i++) {
	//Row Creating
	var row = Ti.UI.createTableViewRow({
		className : 'row',
		objName : 'row',
		touchEnabled : true,
		height : 100
	});
	// View Creating
	var enabledWrapperView = Ti.UI.createView({
		backgroundColor : '#008FD5',
		objName : 'enabledWrapperView',
		rowID : i,
		width : Ti.UI.FILL,
		height : '100%'
	});

	var disabledWrapperView = Ti.UI.createView({
		backgroundColor : '#A2E0FF',
		objName : 'disabledWarpperView',
		touchEnabled : false,
		width : 300,
		height : '80%'
	});
	enabledWrapperView.add(disabledWrapperView);

	var label = Ti.UI.createLabel({
		backgroundColor : '#313F48',
		color : 'white',
		objName : 'label',
		text : i,
		touchEnabled : false,
		left : 0,
		width : 200
	});
	/* 					1 Question ...

	 Here We add the View on TableViewRow.
	 This is working fine with iOS and android. But not with Blackberry10.
	 when we add any View or object the this is not display on Row material.

	 */
	disabledWrapperView.add(label);
	row.add(enabledWrapperView);
	tableData.push(row);
}

table.setData(tableData);

table.addEventListener("click", function(e) {
	var win2 = Ti.UI.createWindow({
		backgroundColor : "#fff",

	});
	var backBtn = Ti.UI.createButton({
		title : "Back",
		top : "0px",
	})
	backBtn.addEventListener("click", function() {
		win2.close();
	});
	/* 					2 Question ...
	 When we use any URL for display any Image then this is not working.
	 If we use Local Image the woking fine.
	 */
	var imgView = Ti.UI.createImageView({
		height : Ti.UI.SIZE,
		width : Ti.UI.SIZE,
		image : "http://cdn.ajolab.com/uploads_show/1000/46/web.jpg"
	});
	win2.add(imgView);
	win2.open();
});

win.add(table);
win.open();

Attachments

FileDateSize
app.js2013-08-06T08:01:56.000+00003635

Comments

  1. Daniel Sefton 2013-08-05

    Hi Mritunjay, Please can you provide a simple reproducible test case that we can drop into an app.js and run? Thanks!
  2. Mritunjay Singh 2013-08-06

    I have attach a app.js. please find that file and check it Thanks for your revert..
  3. Pedro Enrique 2013-08-06

    Please test the latest from 3.1.x It is working fine on my end. http://builds.appcelerator.com.s3.amazonaws.com/index.html#3_1_X
  4. Mritunjay Singh 2013-08-07

    Thanks for your revert... When I update my Titanium SDK with 3.1.2 then this is working fine for me. Thanks a lot.. for your help..
  5. Eric Merriman 2017-03-14

    Closing as resolved.

JSON Source