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
var CircleLoaderView = require("CircleLoaderView"); | |
var myloader = new CircleLoaderView({ | |
width : 200, | |
centerWidth : 100, | |
backgroundColor : "#fff", | |
tintColor : "blue", | |
textColor : "red", | |
labelFontSize : 28 |
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
api.cachedImageView = function(imageDirectoryName, url, imageViewObject, hires) { | |
var filename = url.split('/'); | |
var hiresfilename; | |
filename = filename[filename.length - 1]; | |
hiresfilename = filename.split('.'); | |
hiresfilename = hiresfilename[hiresfilename.length - 2] + '@2x' + hiresfilename[hiresfilename.length - 1]; | |
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, imageDirectoryName, filename); | |
var hiresfile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, imageDirectoryName, hiresfilename); | |
if(file.exists()) { | |
imageViewObject.image = file.nativePath; |
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
/* | |
Copyright 2011 Pedro Enrique | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
var win = Ti.UI.createWindow({ | |
backgroundColor:'stripped' | |
}); | |
win.open(); |
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
<html> | |
<head> | |
<title>Scrolling along the Z-Axis</title> | |
<!-- | |
Example from http://eng.wealtfront.com | |
Assumes browser window is sized at a height of 400px (the size of the black box). | |
--> | |
<style> | |
body{height:600px;} | |
#viewport { |
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
(function() { | |
var win = Ti.UI.createWindow(); | |
var section1 = Ti.UI.createTableViewSection({ | |
headerTitle:'Header 1' | |
}); | |
for (var i=0; i < 4; i++) { | |
section1.add(Ti.UI.createTableViewRow({ | |
title:'Row '+i | |
})); | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@android:id/tabhost" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<LinearLayout | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" |
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
// I was unhappy about there was close to no control over the "pageControl" | |
// in scrollableViews, so I hacked my own | |
// ----- | |
var pages = []; | |
var page; | |
var numberOfPages = 0; | |
// Configuration | |
var pageColor = "#c99ed5"; |
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
var a = Titanium.Filesystem.getFile( Titanium.Filesystem.applicationDirectory, "../Library/Caches/ASIHTTPRequestCache/SessionStore/" ); | |
if( a.exists() ) { | |
a.deleteDirectory(true); | |
} |
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
/** | |
* We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
var isAndroid = Ti.Platform.osname === 'android'; | |
/** | |
* Create our UI elements. | |
*/ | |
var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 }); |