Created
May 25, 2014 05:35
-
-
Save exclusiveTanim/00d3ba474945c1065c6d to your computer and use it in GitHub Desktop.
Circle View Creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*By the following code we can create circle view*/ | |
| var win = Ti.UI.createWindow(); | |
| var shapeSize = 300; | |
| var shapeRadius = shapeSize *0.5; | |
| var shapeResizeH = shapeSize *0.7; | |
| var shapeResizeW = shapeSize* 0.7; | |
| var view = Ti.UI.createView({ | |
| width:shapeSize, | |
| height:shapeSize, | |
| borderRadius:shapeRadius, | |
| backgroundColor:'green' | |
| }); | |
| var lbl = Ti.UI.createLabel({ | |
| width:shapeResizeW, | |
| height:shapeResizeH, | |
| wordWrap:true, | |
| textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, | |
| text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nec diam malesuada, tincidunt mauris sed, eleifend tortor. Donec vulputate, risus at pretium fermentum', | |
| color:'red', | |
| // borderColor:'white' | |
| }); | |
| view.add(lbl); | |
| win.add(view); | |
| win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment