Skip to content

Instantly share code, notes, and snippets.

View egomez99's full-sized avatar

Eduardo Gomez egomez99

  • Automation Testing
  • Guadalajara, Mexico.
  • 09:40 (UTC -06:00)
View GitHub Profile
@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 = {
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
// 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
//
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
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({
@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
@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 / build.log
Created January 24, 2012 20:24
Linking Error in Titanium Studio while creating module with static error
This file has been truncated, but you can view the full file.
================================================================================
Appcelerator Titanium Diagnostics Build Log
The contents of this file are useful to send to Appcelerator Support if
reporting an issue to help us understand your environment, build settings
and aid in debugging. Please attach this log to any issue that you report.
================================================================================
Starting build at 01/24/12 21:05
Build details:
var win = Titanium.UI.currentWindow;
var isAndroid = false;
if(Titanium.Platform.name == 'android') {
isAndroid = true;
}
//
// CREATE ANNOTATIONS
//
var browserWin = require('browser').browserWin;
var browser = new browserWin();
browser.open();