Code Monkey home page Code Monkey logo

jasonkneen.com.jasonkneen.tabdemo's Introduction

TabGroup for Alloy

Demo Video

Overview

This demo app for Appcelerator Alloy MVC framework provides an (Android initially although it should work on iOS) DIRECT TabGroup replacement.

This project came out of my talks at TiConf in New York and Amsterdam where I demonstrated the use of the "module" Alloy attribute to take a standard TabGroup tag and override it, returning a custom element for Android.

The idea was to come up with something that could "just work" on Android and could be implemented by simply adding a module="tabGroup" element to an existing Alloy TabGroup definition.

NOTE: This is very much "work in progress" and I'm tweaking as I use this in current projects. Please feel free to fork, and submit Pull Requests with any updates. See the wishlist.

Latest

  • Initial commit - tested on Android - on iOS you get a standard TabGroup
  • won't support all TabGroup events / properties / methods yet - adding them currently
  • test project removes the actionBar for the whole project so we can use our own NavBar

Features

  • Easy to add to existing XML
  • Simply add tabGroup.js to the /lib folder and module="tabGroup" to existing TabGroup, Tab and Window definitions within an existing TabGroup
  • Easy to customise
  • Designed for Android - on iOS it returns standard TabGroup, Tab, Window

Wishlist

  • Support subwindows like normal tabGroups on iOS

Quick Start

<Alloy>
	<TabGroup module="tabGroup">
		<Tab module="tabGroup" title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" activeColor="#fff">
			<Window module="tabGroup" title="Tab 1">
				<Label onClick="openWin1">Tab 1</Label>
			</Window>
		</Tab>
		<Tab module="tabGroup" title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" activeColor="#fff">
			<Window module="tabGroup"  title="Tab 2">
				<Label onClick="openWin2">Tab 2</Label>
			</Window>
		</Tab>
		<Tab module="tabGroup" title="Tab 3" icon="/images/icons/522-floppy-disk.png" activeIcon="/images/icons/522-floppy-disk_active.png" activeColor="#fff">
			<Window module="tabGroup"  title="Tab 3">
				<Label >Tab 3</Label>
			</Window>
		</Tab>
	</TabGroup>
</Alloy>

or simply add the following to JUST the first Alloy tag:

<Alloy module="tabGroup">

License

Copyright 2017 Jason Kneen

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
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

jasonkneen.com.jasonkneen.tabdemo's People

Contributors

jasonkneen avatar speedyankur avatar

Watchers

Brenton House avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.