Titanium Community Questions & Answer Archive

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

Drawing Shapes

Does any one have any idea of how to Draw shapes on titanium mobile..such as square,circle,polygon .etc

— asked August 9th 2010 by Satta Ravi
  • circle
  • draw
  • polygon
  • shapes
  • square
0 Comments

2 Answers

  • I believe for now only the canvas inside a webview can be used.

    — answered August 9th 2010 by Dan Tamas
    permalink
    1 Comment
    • hi Tamas
      Would you mind explaining it a little more in detail as i really ant figure it how?(people say using a webview will have adverse effect on the performance).

      — commented August 9th 2010 by Satta Ravi
  • Hi Ravi,

    I hope this can helps you!…. regards!

    var v1 = Titanium.UI.createView({
      top:180,
      backgroundColor:'#296EC1',
      height:50,
      width:400
    });
    
    — answered July 5th 2012 by Jimmy García Contreras
    permalink
    1 Comment
    • You can draw a circle or a square like this …

      var circle = Ti.UI.createImageView({
              width: 100,
              height: 100,
                 borderRadius: 50,
           borderColor: '#1a0033',
          backgroundColor:'#296EC1'
      });
      
      var square = Ti.UI.createView({
          top:180,
            backgroundColor:'#296EC1',
          height:50,
            width:400
      });
      

      — commented August 14th 2012 by Jimmy García Contreras
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.