-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Version for Titanium SDK 10.1.0 +
- Loading branch information
Showing
126 changed files
with
14,421 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ios/Build | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2010-2013 Mads Møller | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
NappDrawer | ||
# Napp Drawer Module [![gitTio](http://gitt.io/badge.svg)](http://gitt.io/component/dk.napp.drawer) [![NPM](https://img.shields.io/npm/v/ti-module-dk.napp.drawer.svg?style=flat-square)](https://www.npmjs.com/package/ti-module-dk.napp.drawer) | ||
|
||
<img src="./example-cross-platform.jpg" alt="Cross Platform Example (iOS / Android)" width="800" /> | ||
|
||
## Description | ||
|
||
The Napp Drawer module extends the Appcelerator Titanium Mobile framework. | ||
The module is licensed under the MIT license. | ||
|
||
There are **some minor platform parity differences** in this module. iOS version uses Windows whereas Android uses views. The android version still uses the same properties even though its views rather than windows, e.g. `isAnyWindowOpen()` is the exact same method call on each platform. | ||
|
||
## Quick Start | ||
|
||
### Get it | ||
|
||
Download the latest distribution ZIP-file and consult the [Titanium Documentation](http://docs.appcelerator.com/titanium/latest/#!/guide/Using_a_Module) on how install it | ||
|
||
Or simply use the [gitTio CLI](http://gitt.io/cli) [![gitTio](http://gitt.io/badge.svg)](http://gitt.io/component/dk.napp.drawer) | ||
|
||
`$ gittio install dk.napp.drawer` | ||
|
||
Or NPM [![NPM](https://img.shields.io/npm/v/ti-module-dk.napp.drawer.svg?style=flat-square)](https://www.npmjs.com/package/ti-module-dk.napp.drawer) | ||
|
||
`$ npm i --save ti-module-dk.napp.drawer` | ||
|
||
## Community Driven | ||
|
||
I encourage everyone to send Pull Requests - keeping this module flying with new features. | ||
|
||
## Author | ||
|
||
**Mads Møller** | ||
web: http://www.napp.dk | ||
email: [email protected] | ||
twitter: @nappdev | ||
|
||
|
||
## License | ||
|
||
Copyright (c) 2010-2013 Mads Møller | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="build/.apt_generated"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="/Volumes/DATA/Titanium/androidsdk/platforms/android-8/android.jar"/> | ||
<classpathentry kind="lib" path="/Volumes/DATA/Titanium/androidsdk/tools/support/annotations.jar"/> | ||
<classpathentry kind="lib" path="/Volumes/DATA/Titanium/androidsdk/extras/android/support/v13/android-support-v13.jar"/> | ||
<classpathentry kind="lib" path="/Users/napp/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/kroll-apt.jar"/> | ||
<classpathentry kind="lib" path="/Users/napp/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/kroll-common.jar"/> | ||
<classpathentry kind="lib" path="/Users/napp/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/titanium.jar"/> | ||
<classpathentry kind="lib" path="/Users/napp/Library/Application Support/Titanium/mobilesdk/osx/3.1.3.GA/android/modules/titanium-ui.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tmp | ||
bin | ||
build | ||
.apt_generated | ||
libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
selectUserAgents=com.appcelerator.titanium.mobile.module.nature\:android |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#Thu Sep 02 15:18:34 CDT 2010 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.apt.aptEnabled=true | ||
org.eclipse.jdt.apt.genSrcDir=.apt_generated | ||
org.eclipse.jdt.apt.reconcileEnabled=true | ||
|
||
org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=nappslide.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#Thu Sep 02 15:18:34 CDT 2010 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.processAnnotations=enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
# Napp Drawer Module | ||
|
||
## Description | ||
|
||
The Napp Drawer module extends the Appcelerator Titanium Mobile framework. | ||
The module is licensed under the MIT license. | ||
|
||
Thanks to *Jeremy Feinstein* for his work with this repo: https://github.com/jfeinstein10/SlidingMenu and a special thanks to *Martin Guillon* for helping me out. | ||
|
||
|
||
### NOTICE: The below API method calls are often called something with window. The is only to keep parity with the iOS version of this module. Please remember that this Android version uses views and not windows. | ||
|
||
|
||
## Get the module | ||
|
||
**Find the newest version in the dist folder** | ||
|
||
## Referencing the module in your Ti mobile application | ||
|
||
Simply add the following lines to your `tiapp.xml` file: | ||
|
||
<modules> | ||
<module platform="android">dk.napp.drawer</module> | ||
</modules> | ||
|
||
|
||
## Reference | ||
|
||
For more detailed code examples take a look into the example app. | ||
|
||
For Alloy projects, use the [nl.fokkezb.drawer](https://github.com/fokkezb/nl.fokkezb.drawer) widget. | ||
|
||
### centerWindow, leftWindow, rightWindow | ||
|
||
Napp Drawer does not require you to use the 3 views. You can also use either the combo of center/left or center/right for your desired needs. | ||
|
||
```javascript | ||
var NappDrawerModule = require('dk.napp.drawer'); | ||
var mainWindow = NappDrawerModule.createDrawer({ | ||
fullscreen:false, | ||
leftWindow: leftMenuView, | ||
centerWindow: centerView, | ||
rightWindow: rightMenuView, | ||
fading: 0.2, // 0-1 | ||
parallaxAmount: 0.2, //0-1 | ||
shadowWidth:"40dp", | ||
leftDrawerWidth: "200dp", | ||
rightDrawerWidth: "200dp", | ||
animationMode: NappDrawerModule.ANIMATION_NONE, | ||
closeDrawerGestureMode: NappDrawerModule.CLOSE_MODE_MARGIN, | ||
openDrawerGestureMode: NappDrawerModule.OPEN_MODE_ALL, | ||
orientationModes: [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT] | ||
}); | ||
``` | ||
|
||
## API Properties | ||
|
||
### CenterWindow, leftWindow, rightWindow | ||
|
||
A method that allow change of a view. | ||
|
||
```javascript | ||
var newView = Ti.UI.createView({ | ||
backgroundColor: "#FF0000" | ||
}; | ||
mainWindow.setCenterWindow(newView); | ||
``` | ||
### LeftDrawerWidth, rightDrawerWidth | ||
Update the width with the drawer side view. | ||
```javascript | ||
mainWindow.setLeftDrawerWidth("160dp"); | ||
``` | ||
### OpenDrawerGestureMode | ||
Set gesture support for opening the drawer through a mask. | ||
```javascript | ||
mainWindow.setOpenDrawerGestureMode(NappDrawerModule.OPEN_MODE_NONE); | ||
``` | ||
| input (constant) | Description | | ||
| ----- | ----------- | | ||
| OPEN_MODE_NONE | The user can not open the drawer by any swipe gestures. | | ||
| OPEN_MODE_MARGIN | The user can open the drawer by a swipe gesture on the screen's margin. | | ||
| OPEN_MODE_ALL | The user can open the drawer by a swipe gesture anywhere on the screen. | | ||
### CloseDrawerGestureMode | ||
Set gesture support for closing the drawer through a mask. | ||
```javascript | ||
mainWindow.setCloseDrawerGestureMode(NappDrawerModule.CLOSE_MODE_NONE); | ||
``` | ||
| input (constant) | Description | | ||
| ----- | ----------- | | ||
| CLOSE_MODE_NONE | The user can not close the drawer by any swipe gestures. | | ||
| CLOSE_MODE_MARGIN | The user can close the drawer by a swipe gesture on the screen's margin. | | ||
| CLOSE_MODE_ALL | The user can close the drawer by a swipe gesture anywhere on the screen. | | ||
*Note that these gestures may impact touches sent to the child view controllers, so be sure to use these appropriately for your application.* | ||
### AnimationMode | ||
Set the overall animation of the side views when opening and closing the drawer. | ||
```javascript | ||
mainWindow.setAnimationMode(NappDrawerModule.ANIMATION_SLIDEUP); | ||
``` | ||
| input (constant) | Description | | ||
| ----- | ----------- | | ||
| ANIMATION_NONE | No animation | | ||
| ANIMATION_SLIDEUP | The side view will slide upwards while appearing on the screen. | | ||
| ANIMATION_ZOOM | Zoom animation. | | ||
| ANIMATION_SCALE | The side view will scale. | | ||
### ShadowWidth | ||
How big should the shadow be. Use the "dp" notation to support different resolution on android. | ||
```javascript | ||
mainWindow.setShadowWidth("40dp"); | ||
``` | ||
### ParallaxAmount | ||
Parallax is the amount of parallax between the centerView and a sideView animation. Set a value between 0 and 1. Its a very cool effect. Play with the slider in the example code to see the effect! | ||
```javascript | ||
mainWindow.setParallaxAmount(0.3); | ||
``` | ||
### Fading | ||
Use this property if you want the sideView drawer to fade in and out while entering/leaving the screen. The fade degree is between 0.0 and 1.0. | ||
```javascript | ||
mainWindow.setFading(0.3); | ||
``` | ||
### OrientationModes | ||
Use this property to restrict the drawer to a certain set of orientations. You can use any of Titanium's orientation constants defined in Ti.UI. (LANDSCAPE_LEFT, LANDSCAPE_RIGHT, PORTRAIT, UPSIDE_PORTRAIT). | ||
```javascript | ||
mainWindow.setOrientationModes([Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT]); | ||
``` | ||
## API Methods | ||
### toggleLeftWindow, toggleRightWindow | ||
`toggleLeftWindow()` and `toggleRightWindow()` are used to toggle each visibility of either the left or right view. | ||
```javascript | ||
mainWindow.toggleLeftWindow(); | ||
``` | ||
### isAnyWindowOpen, isLeftWindowOpen, isRightWindowOpen | ||
Check if a side or any views is opened in the drawer. | ||
```javascript | ||
mainWindow. isAnyWindowOpen(); | ||
``` | ||
## Changelog | ||
* v1.1.6 | ||
* Updated Ti min-sdk to 4.1.0.GA | ||
* v1.1.5 | ||
* Fix #159 - useArrowAnimation not working when there is no listener for didChangeOffset | ||
* Fix #162 - Lollipop Bottom Nav Bar Overlays App on Android 5.0 and up | ||
* Updated Ti min-sdk to 4.0.0.GA | ||
* v1.1.4 | ||
* Burger To Arrow animation icon. (Android L style) | ||
* v1.1.3 | ||
* Fix #71 - IllegalStateException when recreating activity in Android | ||
* v1.1.2 | ||
* Added focus/blur events for Android | ||
* v1.1.1 | ||
* Bugfix for ShadowWidth. Issue #51 | ||
* Updated Ti min-sdk to 3.1.3.GA | ||
* v1.1 | ||
* Added variable names to resemble iOS version more - for openDrawerGestureMode and closeDrawerGestureMode | ||
* v1.0 | ||
* init | ||
## Author | ||
**Mads Møller** | ||
web: http://www.napp.dk | ||
email: [email protected] | ||
twitter: @nappdev | ||
## License | ||
Copyright (c) 2010-2013 Mads Møller | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Place your assets like PNG files in this directory and they will be packaged with your module. | ||
|
||
If you create a file named dk.napp.slidemenu.js in this directory, it will be | ||
compiled and used as your module. This allows you to run pure Javascript | ||
modules that are pre-compiled. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
titanium.platform=/Users/marcbender/Library/Application Support/Titanium/mobilesdk/osx/7.1.1.GA/android | ||
android.platform=/Users/marcbender/Library/android-sdk-macosx/platforms/android-23 | ||
module.ndkbuild=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<project name="nappslide" default="dist"> | ||
<description> | ||
Ant build script for Titanium Android module nappslide | ||
</description> | ||
|
||
<property name="ti.module.root" location="${basedir}"/> | ||
<property file="build.properties" /> | ||
|
||
<import file="${titanium.platform}/../module/android/build.xml"/> | ||
</project> |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.