Android TableViewRow
Hi Guys,
I have really been struggling with Android using TableViewRow's Height property. I have three labels to be placed in a row vertically. BUt only two of the labels appear and the third label is hidden because although i set height of the tableViewRow to 'auto' it still sticks to a constant height. Has anyone got a work around to this? even using a single label with n crops the label in the row.
This seems to be a real big bug in appcelerator and unless such is fixed it would be impossible to develop commercial apps using this framework.
var matchNameLabel = Ti.UI.createLabel({
text: matchName+'n'+date+'n'+venue+'n'+result,
font: {fontSize: 14},
textAlign: 'center',
left: 0,
top: 0,
bottom: 0,
right:0,
height: 'auto',
className:'matchNameLabel',
width:'auto'
});
var matchRow = Ti.UI.createTableViewRow({
className: 'match'+i,
layout:'vertical',
height:'auto',
width:'auto',
backgroundColor: '#000000'
});
matchRow.add(matchNameLabel);
var tableView = Titanium.UI.createTableView({
data: data,
height: 'auto',
width: 'auto',
className: 'myTable'
});
8 Answers
-
I am facing the same problem. Have you found a solution?
-
Does anyone know if this was resolved? I'm having the same issue.
Thanks
-
Still experiencing this. if I test the height of a row when set height: "auto" I get a value of 0. All rows are the same height and don't expand based on the content with in them. Works fine on iphone. Anyone know if there's a workaround?
-
I'm also having the same issue. Specifying a numerical height for the row shows all data, but that's no use for dynamic data.
-
Vertical layout on TableViewRow in Android is not working. I'm using mobile API 1.5.1 and found that while such a vertical layout works on the iPhone it does not work on Android.
However, if you add your labels etc to a view with vertical layout, and then add the view to the row it works.
Here is a ticket I found on this issue: https://appcelerator.lighthouseapp.com/projects/32238/tickets/1405-vertical-layout-fails-inside-a-tableviewrow-on-android
-
Vertical layout on TableViewRow in Android is not working. I'm using mobile API 1.5.1 and found that while such a vertical layout works on the iPhone it does not work on Android.
However, if you add your labels etc to a view with vertical layout, and then add the view to the row it works.
Here is a ticket I found on this issue: https://appcelerator.lighthouseapp.com/projects/32238/tickets/1405-vertical-layout-fails-inside-a-tableviewrow-on-android
-
I used a view within the TableViewRow like this:
var row = Titanium.UI.createTableViewRow(params); var mainView = Ti.UI.createView({layout:'vertical', height: 'auto', left: 0, right: 0, backgroundColor: 'transparent', backgroundSelectedColor: 'transparent', backgroundFocusedColor: 'transparent'}); row.add(mainView);
But it had the disadvantage that the row is not highlighted if someone selects/clicks the row. So, I just don't use it. Even if one sets focusable to true and so on.
Cheers
-
Has this been fixed? Im still having problem android row height using dynamic data inside a view.