This file contains 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
/*Its a simple code for Map*/ | |
var MapModule = require('ti.map'); | |
var win = Ti.UI.createWindow({backgroundColor: 'white'}); | |
var scrollView = Ti.UI.createScrollView({ | |
top : 20, | |
layout : 'vertical', | |
contentWidth : 'auto', | |
contentHeight : 'auto', | |
showVerticalScrollIndicator : true, |
This file contains 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
/*ALl Logical and graphical codes for Calculator*/ | |
var self = Ti.UI.createWindow({ | |
title : "GENERAL CALCULATOR", | |
backgroundColor : '#000', | |
layout : 'vertical', | |
orientationModes : [Ti.UI.PORTRAIT] | |
}); | |
// Create a TextField. |
This file contains 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
/* | |
Hello, I have tested this issue in Ti SDK 3.3.0.RC. Its working good. | |
Testing Environment: | |
Titanium SDK: 3.3.0.RC, 3.2.3.GA | |
Titanium CLI: 3.2.3 | |
IOS Simulator 7.1 | |
Appcelerator Studio, build: 3.3.0.201406271159 | |
*/ |
This file contains 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
function viewindetails(ids) { | |
var win = Ti.UI.createWindow({ | |
layout : 'vertical', | |
title : 'View Data In Details', | |
backgroundColor : "#663399" | |
}); | |
//alert(ids); | |
var viewinfo = Ti.UI.createLabel({ | |
text : 'Information View in Details:', |
This file contains 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
/*shading effect on button without using an image. By using following code we can create button in different colours. | |
if we want to add Shading effect on a button without using an image, we use the backgroundGradient property on the button. | |
Here we can see the following example where a button with 3 gradient colours: red, blue and green.*/ | |
var testWin = Titanium.UI.createWindow({ | |
backgroundColor : '#ccc', | |
layout:'vertical' | |
}); | |
var imageView = Titanium.UI.createImageView({ | |
image : 'images1.jpeg', |
This file contains 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
/*Make the scrollableView wider than the device width, make the child views the same width as the device and | |
then the offset the scrollableView with a minus margin equal to half the difference of the two widths. | |
So if we set scrollableView width to 340 and the child views to 320, | |
then the left margin will be -10. Here is a example below.*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor : '#ccc', | |
title : 'Test' | |
}); | |
var tab = Ti.UI.createTab({ | |
icon : 'KS_nav_views.png', |
This file contains 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, |
This file contains 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
/*To animate window from left to right or right to left in iOS, we can use a similar approach as the following code.*/ | |
pWidth = Titanium.Platform.displayCaps.platformWidth; | |
pHeight = Titanium.Platform.displayCaps.platformHeight; | |
var animOutLeft = Ti.UI.createAnimation({ | |
duration : 500, | |
left : -pWidth | |
}); | |
var animOutRight = Ti.UI.createAnimation({ | |
duration : 500, |
This file contains 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
/* | |
Hello, I have tested this issue in Ti SDK 3.3.0.RC. Its working good. | |
Testing Environment: | |
Titanium SDK: 3.3.0.RC, 3.2.3.GA | |
Titanium CLI: 3.2.3 | |
IOS Simulator 7.1 | |
Appcelerator Studio, build: 3.3.0.201406271159 |
This file contains 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
/*If we want to change the displayed window title when a webView is loaded, we can use the following sample code. */ | |
var win1 = Titanium.UI.createWindow({ | |
title : 'Window 1', | |
backgroundColor : '#fff' | |
}); | |
var webView = Ti.UI.createWebView({ | |
url : "http://www.google.com" | |
}); |
OlderNewer