Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not make sense to use the table height as the row height.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for calculating the percentage of height we need the parent view right ?
which we use other than this ?
me use the test case bellow that is working fine
var win=Ti.UI.createWindow();
var tableview=Ti.UI.createTableView({
backgroundColor:'blue'
});
var tableviewrow=Ti.UI.createTableViewRow({
height:'50%',
backgroundColor:'red'
});
var btn = Ti.UI.createButton({
title : '100 %',
height:'100',
width : '150' , top : '110'
});
var btn1 = Ti.UI.createButton({
title : '25 %',
height:'100',
width : '150' , top : '10'
});
var btn300 = Ti.UI.createButton({
title : '300',
height:'100',
width : '150' , top : '210'
});
tableview.setData([tableviewrow]);
win.add(tableview);
win.add(btn);
win.add(btn1);
win.add(btn300);
btn.addEventListener('click', function() {
// Check console
tableviewrow.height = '100%'
});
btn1.addEventListener('click', function() {
// Check console
tableviewrow.height = '25%'
});
btn300.addEventListener('click', function() {
// Check console
tableviewrow.height = '300'
});
win.open();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need the dimension of the parent view to calculate the row height. But the solution is not just simply assigning the row height as the table view height. It's not a logical solution. The measure and layout algorithm in Android is complicated. Need more investigation on this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. i will try to fix it soon