This repository has been archived by the owner on May 25, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7799997
Showing
147 changed files
with
5,738 additions
and
0 deletions.
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,18 @@ | ||
<?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="/Users/benjamin/Android/sdk/platforms/android-8/android.jar"/> | ||
<classpathentry kind="lib" path="/Users/benjamin/Android/sdk/add-ons/addon-google_apis-google-8/libs/maps.jar"/> | ||
<classpathentry kind="lib" path="/Users/benjamin/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/titanium.jar"/> | ||
<classpathentry kind="lib" path="/Users/benjamin/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/kroll-common.jar"/> | ||
<classpathentry kind="lib" path="/Users/benjamin/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/kroll-apt.jar"/> | ||
<classpathentry kind="src" path=".apt_generated"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry combineaccessrules="false" kind="src" path="/SquareLibrary"/> | ||
<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 | ||
*.zip | ||
.apt_generated |
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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>calendarview</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.appcelerator.titanium.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>com.appcelerator.titanium.mobile.module.nature</nature> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
</projectDescription> |
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=calendarview.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 @@ | ||
Place your change log text here. This file will be incorporated with your app at package time. |
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 @@ | ||
TODO: place your license here and we'll include it in the module distribution |
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 @@ | ||
Place your license text here. This file will be incorporated with your app at package time. |
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 ti.squaredcalendar.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/benjamin/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android | ||
android.platform=/Users/benjamin/Android/sdk/platforms/android-8 | ||
google.apis=/Users/benjamin/Android/sdk/add-ons/addon-google_apis-google-8 |
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="calendarview" default="dist"> | ||
<description> | ||
Ant build script for Titanium Android module calendarview | ||
</description> | ||
|
||
<property name="ti.module.root" location="${basedir}"/> | ||
<property file="build.properties" /> | ||
|
||
<import file="${titanium.platform}/../module/android/build.xml"/> | ||
</project> |
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,39 @@ | ||
# calendarview Module | ||
|
||
## Description | ||
|
||
TODO: Enter your module description here | ||
|
||
## Accessing the calendarview Module | ||
|
||
To access this module from JavaScript, you would do the following: | ||
|
||
var calendarview = require("ti.squaredcalendar"); | ||
|
||
The calendarview variable is a reference to the Module object. | ||
|
||
## Reference | ||
|
||
TODO: If your module has an API, you should document | ||
the reference here. | ||
|
||
### ___PROJECTNAMEASIDENTIFIER__.function | ||
|
||
TODO: This is an example of a module function. | ||
|
||
### ___PROJECTNAMEASIDENTIFIER__.property | ||
|
||
TODO: This is an example of a module property. | ||
|
||
## Usage | ||
|
||
TODO: Enter your usage example here | ||
|
||
## Author | ||
|
||
TODO: Enter your author name, email and other contact | ||
details you want to share here. | ||
|
||
## License | ||
|
||
TODO: Enter your license/legal information here. |
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,39 @@ | ||
// This is a test harness for your module | ||
// You should do something interesting in this harness | ||
// to test out the module and to provide instructions | ||
// to users on how to use it by example. | ||
|
||
|
||
// open a single window | ||
var win = Ti.UI.createWindow({ | ||
backgroundColor:'white' | ||
}); | ||
var label = Ti.UI.createLabel(); | ||
win.add(label); | ||
win.open(); | ||
|
||
// TODO: write your module tests here | ||
var calendarview = require('ti.squaredcalendar'); | ||
Ti.API.info("module is => " + calendarview); | ||
|
||
label.text = calendarview.example(); | ||
|
||
Ti.API.info("module exampleProp is => " + calendarview.exampleProp); | ||
calendarview.exampleProp = "This is a test value"; | ||
|
||
if (Ti.Platform.name == "android") { | ||
var proxy = calendarview.createExample({ | ||
message: "Creating an example Proxy", | ||
backgroundColor: "red", | ||
width: 100, | ||
height: 100, | ||
top: 100, | ||
left: 150 | ||
}); | ||
|
||
proxy.printMessage("Hello world!"); | ||
proxy.message = "Hi world!. It's me again."; | ||
proxy.printMessage("Hello world!"); | ||
win.add(proxy); | ||
} | ||
|
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 @@ | ||
These files are not yet supported as of 1.4.0 but will be in a near future release. |
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,35 @@ | ||
#!/usr/bin/env python | ||
# | ||
# This is the module project add hook that will be | ||
# called when your module is added to a project | ||
# | ||
import os, sys | ||
|
||
def dequote(s): | ||
if s[0:1] == '"': | ||
return s[1:-1] | ||
return s | ||
|
||
def main(args,argc): | ||
# You will get the following command line arguments | ||
# in the following order: | ||
# | ||
# project_dir = the full path to the project root directory | ||
# project_type = the type of project (desktop, mobile, ipad) | ||
# project_name = the name of the project | ||
# | ||
project_dir = dequote(os.path.expanduser(args[1])) | ||
project_type = dequote(args[2]) | ||
project_name = dequote(args[3]) | ||
|
||
# TODO: write your add hook here (optional) | ||
|
||
|
||
# exit | ||
sys.exit(0) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
main(sys.argv,len(sys.argv)) | ||
|
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 @@ | ||
#!/usr/bin/env python | ||
# | ||
# This is the module install hook that will be | ||
# called when your module is first installed | ||
# | ||
import os, sys | ||
|
||
def main(args,argc): | ||
|
||
# TODO: write your install hook here (optional) | ||
|
||
# exit | ||
sys.exit(0) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
main(sys.argv,len(sys.argv)) | ||
|
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,34 @@ | ||
#!/usr/bin/env python | ||
# | ||
# This is the module project remove hook that will be | ||
# called when your module is remove from a project | ||
# | ||
import os, sys | ||
|
||
def dequote(s): | ||
if s[0:1] == '"': | ||
return s[1:-1] | ||
return s | ||
|
||
def main(args,argc): | ||
# You will get the following command line arguments | ||
# in the following order: | ||
# | ||
# project_dir = the full path to the project root directory | ||
# project_type = the type of project (desktop, mobile, ipad) | ||
# project_name = the name of the project | ||
# | ||
project_dir = dequote(os.path.expanduser(args[1])) | ||
project_type = dequote(args[2]) | ||
project_name = dequote(args[3]) | ||
|
||
# TODO: write your remove hook here (optional) | ||
|
||
# exit | ||
sys.exit(0) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
main(sys.argv,len(sys.argv)) | ||
|
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,18 @@ | ||
#!/usr/bin/env python | ||
# | ||
# This is the module uninstall hook that will be | ||
# called when your module is uninstalled | ||
# | ||
import os, sys | ||
|
||
def main(args,argc): | ||
|
||
# TODO: write your uninstall hook here (optional) | ||
|
||
# exit | ||
sys.exit(0) | ||
|
||
|
||
if __name__ == '__main__': | ||
main(sys.argv,len(sys.argv)) | ||
|
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,18 @@ | ||
# | ||
# this is your module manifest and used by Titanium | ||
# during compilation, packaging, distribution, etc. | ||
# | ||
version: 0.1 | ||
apiversion: 2 | ||
description: My module | ||
author: Benjamin Bahrenburg | ||
license: Specify your license | ||
copyright: Copyright (c) 2013 by Your Company | ||
|
||
|
||
# these should not be edited | ||
name: calendarview | ||
moduleid: ti.squaredcalendar | ||
guid: a1dc9ab6-7c5a-41b9-a18a-70273d5815d0 | ||
platform: android | ||
minsdk: 3.1.0.GA |
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 @@ | ||
You can place platform-specific files here in sub-folders named "android" and/or "iphone", just as you can with normal Titanium Mobile SDK projects. Any folders and files you place here will be merged with the platform-specific files in a Titanium Mobile project that uses this module. | ||
|
||
When a Titanium Mobile project that uses this module is built, the files from this platform/ folder will be treated the same as files (if any) from the Titanium Mobile project's platform/ folder. |
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,26 @@ | ||
package ti.squaredcalendar; | ||
|
||
import java.util.Date; | ||
|
||
import com.squareup.timessquare.CalendarPickerView; | ||
import com.squareup.timessquare.CalendarPickerView.SelectionMode; | ||
|
||
import org.appcelerator.titanium.view.TiUIView; | ||
import org.appcelerator.titanium.proxy.TiViewProxy; | ||
|
||
public class CalendarView extends TiUIView { | ||
public CalendarView(TiViewProxy proxy) | ||
{ | ||
super(proxy); | ||
|
||
final CalendarPickerView calendar = | ||
new CalendarPickerView(proxy.getActivity(),null); | ||
calendar.init(new Date(), new Date()) // | ||
.inMode(SelectionMode.SINGLE) // | ||
.withSelectedDate(new Date()); | ||
|
||
// Set the view as the native view. You must set the native view | ||
// for your view to be rendered correctly. | ||
setNativeView(calendar); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Android/Module/src/ti/squaredcalendar/CalendarViewProxy.java
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,28 @@ | ||
package ti.squaredcalendar; | ||
import org.appcelerator.kroll.annotations.Kroll; | ||
import org.appcelerator.titanium.view.TiUIView; | ||
import org.appcelerator.titanium.proxy.TiViewProxy; | ||
|
||
import android.app.Activity; | ||
@Kroll.proxy(creatableInModule = CalendarviewModule.class) | ||
public class CalendarViewProxy extends TiViewProxy { | ||
|
||
|
||
public CalendarViewProxy() { | ||
super(); | ||
} | ||
|
||
public TiUIView createView(Activity activity) | ||
{ | ||
// This method is called when the view needs to be created. This is | ||
// a required method for a TiViewProxy subclass. | ||
|
||
CalendarView view = new CalendarView(this); | ||
view.getLayoutParams().autoFillsHeight = true; | ||
view.getLayoutParams().autoFillsWidth = true; | ||
|
||
return view; | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.