Skip to content

Commit

Permalink
Fixed Version for Titanium SDK 10.1.0 +
Browse files Browse the repository at this point in the history
  • Loading branch information
mbender74 committed Jul 20, 2021
1 parent 0ee4a87 commit a96ba1d
Show file tree
Hide file tree
Showing 126 changed files with 14,421 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ios/Build
.DS_Store
19 changes: 19 additions & 0 deletions LICENSE
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.
59 changes: 58 additions & 1 deletion README.md
100644 → 100755
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.
14 changes: 14 additions & 0 deletions android/.classpath
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>
5 changes: 5 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tmp
bin
build
.apt_generated
libs
2 changes: 2 additions & 0 deletions android/.settings/com.aptana.editor.common.prefs
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
7 changes: 7 additions & 0 deletions android/.settings/org.eclipse.jdt.apt.core.prefs
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
3 changes: 3 additions & 0 deletions android/.settings/org.eclipse.jdt.core.prefs
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
236 changes: 236 additions & 0 deletions android/README.md
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.
6 changes: 6 additions & 0 deletions android/assets/README
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.

3 changes: 3 additions & 0 deletions android/build.properties
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
10 changes: 10 additions & 0 deletions android/build.xml
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 added android/dist/dk.napp.drawer-android-2.0.3.zip
Binary file not shown.
Binary file added android/dist/nappslide.jar
Binary file not shown.
Loading

0 comments on commit a96ba1d

Please sign in to comment.