Skip to content

Commit

Permalink
Merge pull request #114 from dlifshitz-maca/TIMOB-10025_01
Browse files Browse the repository at this point in the history
TIMOB-10025: BlackBerry: Sync with Appcelerator branch

[Changes]
added platforms to Titanium.UI.View: horizontalWrap

Conflicts:
    .gitignore
    apidoc/Titanium/UI/Button.yml
    apidoc/Titanium/UI/ImageView.yml
    apidoc/Titanium/UI/OptionDialog.yml
    apidoc/Titanium/UI/ProgressBar.yml
    apidoc/Titanium/UI/TextField.yml
    support/project.py

[Tests]
Test 1) Created, built, run project using command line
Test 2) Created, built, run project using Titanium Studio Nightly
  • Loading branch information
dlifshitz-maca committed Jul 25, 2012
2 parents 54db887 + 2804a3e commit d76b1fc
Show file tree
Hide file tree
Showing 524 changed files with 21,953 additions and 5,605 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ xcuserdata
*.o
x86
arm
anvil/driver/config.js
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if build_type in ['full', 'android'] and not only_package:
d = os.getcwd()
os.chdir('android')
try:
sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 8)
sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 14)
build_x86 = int(ARGUMENTS.get('build_x86', 1))

# TODO re-enable javadoc targets = ["full.build", "build.titanium.javadoc"]
Expand Down
7 changes: 6 additions & 1 deletion android/build/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Common ant tasks and macros for building Android-based Titanium modules and proj
<property name="android.platform" location="${env.ANDROID_PLATFORM}"/>
</then>
<else>
<property name="android.platform" location="${android.sdk}/platforms/android-8"/>
<property name="android.platform" location="${android.sdk}/platforms/android-14"/>
</else>
</if>
<if>
Expand Down Expand Up @@ -687,6 +687,11 @@ Common ant tasks and macros for building Android-based Titanium modules and proj
<fileset dir="${dist.dir}" includes="**/*" excludes="libv8/**/*" defaultexcludes="false"/>
</delete>

<!-- Clean up the generated rhino files -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${kroll.rhino.project.dir}/generated" includes="**/*" defaultexcludes="false"/>
</delete>

<!-- V8 clean target requires we have libv8 for now -->
<build.ti.ant.tasks/>
<define.ti.ant.tasks/>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/accelerometer/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="ti.modules.titanium.accelerometer"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/accelerometer/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
2 changes: 1 addition & 1 deletion android/modules/analytics/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/analytics/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
2 changes: 1 addition & 1 deletion android/modules/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/android/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=android-14
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected void handleOpen(KrollDict options)
}

@Override
protected Activity handleGetActivity()
protected Activity getWindowActivity()
{
if (view == null) return null;
return ((TiUIActivityWindow)view).getActivity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.media.AudioManager;
import android.view.MenuItem;

@Kroll.module
public class AndroidModule extends KrollModule
Expand Down Expand Up @@ -230,6 +231,12 @@ public class AndroidModule extends KrollModule
@Kroll.constant public static final int STREAM_SYSTEM = AudioManager.STREAM_SYSTEM;
@Kroll.constant public static final int STREAM_VOICE_CALL = AudioManager.STREAM_VOICE_CALL;

@Kroll.constant public static final int SHOW_AS_ACTION_ALWAYS = MenuItem.SHOW_AS_ACTION_ALWAYS;
@Kroll.constant public static final int SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW = MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW;
@Kroll.constant public static final int SHOW_AS_ACTION_IF_ROOM = MenuItem.SHOW_AS_ACTION_IF_ROOM;
@Kroll.constant public static final int SHOW_AS_ACTION_NEVER = MenuItem.SHOW_AS_ACTION_NEVER;
@Kroll.constant public static final int SHOW_AS_ACTION_WITH_TEXT = MenuItem.SHOW_AS_ACTION_WITH_TEXT;

protected RProxy r;

public AndroidModule()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2011 by Appcelerator, Inc. All Rights Reserved.
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
Expand Down Expand Up @@ -49,6 +49,16 @@ public String getUrl()
return url;
}

@Override
protected void contextCreated()
{
super.contextCreated();
TiActivityWindowProxy window = new TiActivityWindowProxy();
window.setActivity(this);
TiBindingHelper.bindCurrentWindow(window);
setWindowProxy(window);
}

@Override
protected void scriptLoaded()
{
Expand All @@ -59,12 +69,9 @@ protected void scriptLoaded()
@Override
protected void windowCreated()
{
// Set window proxy here to make sure layout != null
TiActivityWindowProxy win = new TiActivityWindowProxy();
win.setActivity(this);
TiBindingHelper.bindCurrentWindow(win);
setWindowProxy(win);

// Set the layout proxy here since it's not ready when we indirectly call it inside contextCreated()
setLayoutProxy(window);

// The UIWindow needs to be created before we run the script
activityWindow = new TiUIActivityWindow((TiActivityWindowProxy)window, this, layout);
super.windowCreated();
Expand All @@ -75,4 +82,11 @@ protected boolean shouldFinishRootActivity()
{
return getIntentBoolean(TiC.PROPERTY_EXIT_ON_CLOSE, false) || super.shouldFinishRootActivity();
}

@Override
public boolean isJSActivity()
{
return true;
}

}
2 changes: 1 addition & 1 deletion android/modules/app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/app/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
2 changes: 1 addition & 1 deletion android/modules/calendar/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/calendar/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../android
android.library.reference.3=../../titanium
2 changes: 1 addition & 1 deletion android/modules/contacts/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/contacts/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
2 changes: 1 addition & 1 deletion android/modules/database/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/database/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium
2 changes: 1 addition & 1 deletion android/modules/facebook/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="7" />
<uses-sdk android:minSdkVersion="8" />

<application android:label="@string/app_name">
</application>
Expand Down
2 changes: 1 addition & 1 deletion android/modules/facebook/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

android.library=true
# Project target.
target=Google Inc.:Google APIs:7
target=Google Inc.:Google APIs:8
android.library.reference.1=../../runtime/common
android.library.reference.2=../../titanium

0 comments on commit d76b1fc

Please sign in to comment.