Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

why i couldn't stick my button on tabel view footer??

hi, i try to stick a button on my table view footer. i put my button on a view and put my view on footerView property. it seems work well on android, but the button doesn't appear on iphone. could anybody please help me??

here is my code

inline code

var footer = Ti.UI.createView({

    height:100
});

var footerButton = Ti.UI.createButton({

    title:'Add Row',
    color:'#191',
        left:125,
    width:'auto',
    height:'auto'
});

footer.add(footerButton);

var tableViewOptions = {
        data: data,
        footerView:footer 
};

// create table view
var tableview = Titanium.UI.createTableView(
    tableViewOptions
);
— asked November 13th 2010 by Wilson Wijaya
  • button
  • footer
  • mobile
  • tableview
  • view
1 Comment
  • Wilson

    Where is window creation? Please post a script that runs by default, so that it's eawsy for someone to get it running on their system. Then I am sure someone will help you.

    Thanks

    — commented November 13th 2010 by Paul Dowsett

2 Answers

  • its in the tabgroup hierarcy so after

    // create table view

    var tableview = Titanium.UI.createTableView(
    tableViewOptions
    );

    there is :

    Titanium.UI.currentWindow.add(tableview);
    
    — answered November 15th 2010 by Wilson Wijaya
    permalink
    0 Comments
  • ok, case solved…

    i already have solved this issue

    var footerButton = Ti.UI.createButton({
    
        title:'Add Row',
        color:'#191',
            left:125,
        width:'auto', //cannot be filled with 'auto',  you must type the value for iphone
        height:'auto' //cannot be filled with 'auto',  you must type the value for iphone
    });
    

    thx all :D

    — answered November 15th 2010 by Wilson Wijaya
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.