Quantcast
Viewing latest article 5
Browse Latest Browse All 24

Auto Height on 2nd Gen iPod different on iPhone

I have a tableviewrow with a labels inside. The code is below.

var CustomData2 = [
{title2:L('tips_title'), subtitle_info:L('tips'),touch:'false',className:"info_rows",rightImage:''}, //This displays correctly.
{title2:L('besttime_title'), subtitle_info:L('besttime'),touch:'false',className:"info_rows",rightImage:""},//This displays correctly.
{title2:L('address_title'), subtitle_info:L('address'), url:'../city_map_single.js',className:"info_rows",rightImage:""},//This displays correctly.
{title2:L('website_title'), subtitle_info:L('website'),className:"info_rows",name:'websitename',rightImage:""},//This displays correctly.
{title2:L('opening_title'), subtitle_info:L('opening'),touch:'false',className:"info_rows",rightImage:""},//This displays correctly.
{title2:L('tickets_title'), subtitle_info:L('tickets'),touch:'false',className:"info_rows",rightImage:""},//This displays correctly.
{title2:L('free_title'), subtitle_info:L('free'),header:"Useful Information",touch:'false',className:"info_rows",rightImage:'../../top_icon.png',name:'free_name_2'},//This displays correctly.
{header:L('funfact_title'),subtitle_info:L('funfact'),touch:'false',className:"info_rows",rightImage:"",name:'fact_name'},//This DOESN'T display correctly.
{subtitle_info:L(landmarkshareid+'_summary'),header:'',touch:'false',className:"info_rows",rightImage:""}//This DOESN'T display correctly.
];
 
 
 
for (var n = CustomData2.length - 1; n >= 0; n--){
 
    var info = Titanium.UI.createTableViewRow({
        url:CustomData2[n].url,
        leftImage:CustomData2[n].leftImage,
        header:CustomData2[n].header, 
        height:'auto',
        minRowHeight:45,
        layout:'vertical',
        selectionStyle:CustomData2[n].touch,
        name:CustomData2[n].name,
        width:CustomData2[n].width,
        rightImage:CustomData2[n].rightImage,
        className:CustomData2[n].className
                });
 
    var title2 = Titanium.UI.createLabel({
    top:10,
    left:10,
    height:'auto',
    text:CustomData2[n].title2,
    font:{fontSize:15,fontColor:"#000000",fontWeight:'bold'}
    });
 
    var subtitle_info = Titanium.UI.createLabel({
    text:CustomData2[n].subtitle_info,
    top:5,
    left:10,
    font:{fontSize:14,fontColor:"#000000"},
    height:'auto',
    bottom:10,
    width:280
    });
For some reason, the code above displays fine on iPhone 3GS, iPhone 4 and iPad, however, on the iPod(2nd gen), its like the label has a bunch of padding at the top. This does not apply to all of the rows, only the last two in the list. Also, this only happened when I upgraded from SDK 1.5 to 1.7.2.

Has anyone seen this kind of activity before?


Viewing latest article 5
Browse Latest Browse All 24

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>