Titanium Community Questions & Answer Archive

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

load image using data from tableview

Hello,

I'm loading a list of results into a tableview. When the user clicks a row, I want to open an imageview to show the full image in horizontal mode. I see examples to create image views directly from the list, but that's not what I want. I have no problem showing the list of rows in the table view. But the problem is, how do I, onclick, trigger a function to call an xhr(to get the image from the web?) and show it full sscreen horizontally

— asked November 2nd 2010 by Stanislav Palatnik
  • imageview
0 Comments

1 Answer

  • As locking orientation may be perceived as hindering user choice, would there not be a chance that apple will reject your app? It would be interesting to hear other Ti devs' experience of this, and whether it is an issue.

    Unfortunately there isn't a single example in the KitchenSink that demonstrates restricting the orientation. However, it is done like this:

    var win = Titanium.UI.currentWindow;
    win.orientationModes = [
        Titanium.UI.LANDSCAPE_LEFT,
        Titanium.UI.LANDSCAPE_RIGHT
    ];
    

    That said, I would tend to set orientationModes at window creation, if possible.

    See this example to display a remote image.

    — answered November 5th 2010 by Paul Dowsett
    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.