[TIMOB-14771] BlackBerry: Cannot add view to tableViewRow
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-07T18:47:04.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | BlackBerry |
Labels | blackberry, parity |
Reporter | Mritunjay Singh |
Assignee | Pedro Enrique |
Created | 2013-08-05T11:22:46.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
app.js | 2013-08-06T08:01:56.000+0000 | 3635 |
Hi Mritunjay, Please can you provide a simple reproducible test case that we can drop into an app.js and run? Thanks!
I have attach a app.js. please find that file and check it Thanks for your revert..
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
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..
Closing as resolved.