Skip to content

Instantly share code, notes, and snippets.

View jonrmitchell's full-sized avatar

Jonathan Mitchell jonrmitchell

  • Innoventrum
  • Kennewick, WA
View GitHub Profile
@jonrmitchell
jonrmitchell / crossPlatformTabbedBar.js
Last active July 1, 2018 12:41
Titanium Module. Android doesn't have a tabbedBar like iOS does, so this was my attempt at duplicating the functionality and API http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.ButtonBar
/**
* Android doesn't have a tabbedBar like iOS does, so this was my attempt at duplicating the functionality and API
* http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.ButtonBar
* @param {Dictionary<Titanium.UI.Button>} params
*/
function createTabbedBar(params) {
if (!params.labels || params.labels.length === 0) {
throw "You must specify button titles in a 'labels' member on the passed in object";
}