Skip to content

Instantly share code, notes, and snippets.

View bob-sims's full-sized avatar

Bob Sims bob-sims

View GitHub Profile
@jasonkneen
jasonkneen / index.xml
Last active July 11, 2020 14:07
Flipboard style tabgroup indicator for iOS. Drop tabIndicator.js into your Alloy lib folder, then add the module tag to your tabgroup and parameters to override the defaults. As you click on each tab, the indicator will slide across. VIDEO https://www.dropbox.com/s/cbw5e1ruksud9uo/tabindicator.mp4?dl=0
<!-- note the ONLY change to this is the additional module="tabIndicator"
attribute + properties to override indicator defaults //-->
<Alloy>
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%">
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff">
<Window title="Tab 1" barColor="black" navTextColor = "#fff">
<Label onClick="openWin1">Tab 1</Label>
</Window>
</Tab>
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff">
@FokkeZB
FokkeZB / index.js
Last active November 5, 2015 17:15
Checking for Titanium API objects
var jsObject = {
foo: 'bar'
};
var tiObject = Ti.UI.create2DMatrix();
function isJsObject(obj) {
return typeof obj.__proto__ !== 'undefined';
}
@drmas
drmas / app.tss
Last active August 13, 2016 17:28 — forked from tonylukasavage/app.tss
'Label[platform=android]': {
color: '#000' // all platforms except Android default to black
}
'Window': {
backgroundColor: '#fff' // white background instead of default transparent
}
'Window[platform=android]': {
modal: false // make android windows all heavyweight
@FokkeZB
FokkeZB / SHARING.md
Last active December 16, 2015 15:49
Sharing lib for Titanium
@aaronksaunders
aaronksaunders / post.js
Last active March 16, 2019 14:57
Start of rest adapter for Appcelerator Alloy & sample model file
//
// blog.clearlyionnovative.com
// twitter: @aaronksaunders
//
// Model file for integration Appcelerator Titanium Alloy with Wordpress JSON Plugin
//
exports.definition = {
config : {
"columns" : {},
@raulriera
raulriera / HorizontalTableView.js
Created January 24, 2013 12:37
Horizontal TableView for Titanium Appcelerator. This still needs some android love, trying to use an inverted tableview made the table impossible to scroll (on android)
function HorizontalTableView(options) {
// defaults params
var options = options || {};
options.width = options.width || Titanium.Platform.displayCaps.platformWidth;
options.height = options.height || Titanium.Platform.displayCaps.platformHeight;
var isAndroid = Ti.Platform.osname === 'android';
// On iOS we can do this, on Android there is some weird scrolling problems
exports.definition =
config:
adapter:
type: "rest"
name: "Agent"
extendModel: (Model) ->
_.extend Model::,
url: ->
@ricardoalcocer
ricardoalcocer / index.js
Created November 23, 2012 19:49
Basic Alloy : Dynamic TableView Handling
function showItems(e) {
Ti.API.info(e.rowData.itemName);
}
var rowData=[];
for(var i=1;i<=10;i++){
var payload={
rowId:i,
itemName:'Test' + i
}
@Xaynder
Xaynder / app.js
Created November 5, 2012 12:35
Titanium iOS Sliding Menu
//// ---- Menu window, positioned on the left
var menuWindow = Ti.UI.createWindow({
top:0,
left:0,
width:150
});
menuWindow.open();
//// ---- Menu Table
// Menu Titles
@aaronksaunders
aaronksaunders / app.js
Created September 18, 2012 21:07
Integrating ACS with NODE JS - This works, BUT I want to migrate it to using the new Node.ACS platform
// SEE QUESTION IN QA FORUM
// http://developer.appcelerator.com/question/142378/integrating-nodeacs-with-expressjs-not-working
// @aaronksaunders
//
/**
* Module dependencies.
*/
var express = require('express');