Skip to content

Instantly share code, notes, and snippets.

View egomez99's full-sized avatar

Eduardo Gomez egomez99

  • Automation Testing
  • Guadalajara, Mexico.
  • 02:51 (UTC -06:00)
View GitHub Profile
@egomez99
egomez99 / TableView operations
Created January 25, 2012 17:59
Common methods in TableViews
var win = Ti.UI.createWindow();
win.backgroundColor = '#EEE';
var tableView = Ti.UI.createTableView({
width: 300,
height: 200,
top: 155,
left: 10,
backgroundColor: '#AAA'
});
@egomez99
egomez99 / gist:1679623
Created January 25, 2012 23:22
Wipe clean tableView
Ti.UI.setBackgroundColor('#000');
var openButton = Ti.UI.createButton({
title : 'Open Win'
});
var win = Ti.UI.createWindow({
title : 'Root Win',
tabBarHidden : true,
rightNavButton : openButton
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var shareButton = Ti.UI.createButton({ width: 120, bottom: 30, height: 50, title: 'Tweet "Hello, World!"' });
win.add(shareButton);
win.open();
var social = require('social');
var twitter = social.create({
How to use multiple MapActivities/MapViews per Android application/process
http://stackoverflow.com/questions/3379575/how-to-use-multiple-mapactivities-mapviews-per-android-application-process
Using MapView in different windows
http://developer.appcelerator.com/question/34041/using-mapview-in-different-windows
Titanium for Android - how to create multiple mapView
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
E/TiApplication(32397): (KrollRuntimeThread) [1518,2501] APP PROXY: ti.modules.titanium.app.AppModule@449d9678
D/Module (32397): Loading module: social -> Resources/social.js
I/TiAPI (32397): *********************************************
I/TiAPI (32397): If you like the OAuth Adapter, consider donating at
I/TiAPI (32397): https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=T5HUU4J5EQTJU&lc=IT&item_name=OAuth Adapter&currency_code=USD&bn=PP 0DonationsBF abtn_donate_LG-1.050836e-303gif aNonHosted
I/TiAPI (32397): *********************************************
D/TiAPI (32397): Loading access token for service [twitter].
I/TiRootActivity(32397): (main) [0,0] checkpoint, on root activity resume. activity = com.appcelerator.ok.T13183Activity@449fe998
I/ActivityManager( 1350): Displayed activity com.appcelerator.ok/.T13183Activity: 7669 ms (total 7669 ms)
I/Gmail (32389): MainSyncRequestProto: lowestBkwdConvoId: 0, highestHandledServerOp: 431122, normalSync: true
@egomez99
egomez99 / app.js
Created February 3, 2012 16:14
2 MapViews in Android
var win = Ti.UI.createWindow({
backgroundColor:'red',
fullscreen: false,
tabBarHidden: true
});
var win1 = Ti.UI.createWindow({url: 'map1.js'});
var win2 = Ti.UI.createWindow({url: 'map2.js'});
var annotationParams1 = {
@egomez99
egomez99 / app.js
Created February 3, 2012 18:44
An Annotation in iOS
var win = Ti.UI.createWindow();
//
// CREATE ANNOTATIONS
//
var atlantaParams = {
latitude:33.74511,
longitude:-84.38993,
@egomez99
egomez99 / OrientationModes
Created February 10, 2012 21:24
CreateMailDialog()
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
tabGroup.orientationModes = [Titanium.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.UPSIDE_PORTRAIT];
//
// create base UI tab and root window
//
<style type="text/css">
.dropcap:first-letter {
float: left;
font-size: 4em;
line-height: .8em;
margin-right: 3px;
padding: 2px;
}
h1 + p:first-letter {