Skip to content

Commit bba2d41

Browse files
committed
Move Finch Framework to library project
1 parent b478a00 commit bba2d41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+227
-117
lines changed

AndroidUIDemo/src/com/oreilly/demo/android/pa/uidemo/TouchMe.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ public boolean onKey(View v, int keyCode, KeyEvent event) {
176176
}
177177

178178
makeDot(dotModel, dotView, color);
179-
return true;
180179

180+
return true;
181181
} });
182182

183183

FinchChat/AndroidManifest.xml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.finchframework.finch"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
<application android:icon="@drawable/icon"
7+
android:label="@string/app_name"
8+
android:debuggable="true">
9+
<activity android:name=".FinchWelcome"
10+
android:label="@string/app_name">
11+
<intent-filter>
12+
<action android:name="android.intent.action.MAIN" />
13+
<category android:name="android.intent.category.LAUNCHER" />
14+
</intent-filter>
15+
</activity>
16+
<activity android:name="com.finchframework.bluetooth.BtConsoleActivity" />
17+
<activity android:name="com.finchframework.bluetooth.DeviceListActivity"
18+
android:label="@string/select_device"
19+
android:configChanges="orientation|keyboardHidden"/>
20+
<activity android:name="animate.AnimateActivity"></activity>
21+
</application>
22+
23+
<uses-permission android:name="android.permission.INTERNET" />
24+
<uses-permission android:name="android.permission.BLUETOOTH" />
25+
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
26+
27+
<uses-sdk android:minSdkVersion="7" />
28+
</manifest>
File renamed without changes.
File renamed without changes.

FinchFrameworkTest/project.properties renamed to FinchChat/project.properties

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99

1010
# Project target.
1111
target=android-14
12+
android.library=false

FinchChat/res/anim/flip.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android">
3+
<rotate
4+
android:fromDegrees="0.0"
5+
android:toDegrees="180.0"
6+
android:pivotX="50%"
7+
android:pivotY="50%"
8+
android:duration="2000"
9+
/>
10+
</set>
158 KB
File renamed without changes.
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<menu xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:id="@+id/menu_lifecycle"
5+
android:icon="@android:drawable/ic_menu_manage"
6+
android:title="@string/lifecycle_explorer" />
7+
<item android:id="@+id/menu_bluetooth"
8+
android:icon="@android:drawable/ic_menu_manage"
9+
android:title="@string/bluetooth_tools" />
10+
<item android:id="@+id/menu_animation"
11+
android:icon="@android:drawable/ic_menu_rotate"
12+
android:title="@string/animation_example" />
13+
</menu>
14+

FinchChat/res/values/colors.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
<color name="white">#ffffff</color>
3+
<color name="medium_gray">#444444</color>
4+
<color name="blue">#0000bb</color>
5+
</resources>

FinchChat/res/values/strings.xml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="hello">Hello World, FinchWelcome!</string>
4+
<string name="app_name">Finch</string>
5+
6+
<string name="finch_video_app_name">Finch Video</string>
7+
<string name="finch_video_update_content">Update Content</string>
8+
<string name="finch_video_search">Search Videos</string>
9+
<string name="checkbox_app_name">Checkbox App</string>
10+
11+
<dimen name="finch_video_padding">2px</dimen>
12+
13+
<string-array name="finchwelcomemenustrings">
14+
<item>"Preferences"</item>
15+
</string-array>
16+
17+
<string name="send">Send</string>
18+
<string name="not_connected">You are not connected to a device</string>
19+
<string name="bt_not_enabled_leaving">Bluetooth was not enabled. Leaving Bluetooth Chat.</string>
20+
<string name="title_connecting">connecting...</string>
21+
<string name="title_connected_to">connected: </string>
22+
<string name="title_not_connected">not connected</string>
23+
24+
<!-- DeviceListActivity -->
25+
<string name="scanning">scanning for devices...</string>
26+
<string name="select_device">select a device to connect</string>
27+
<string name="none_paired">No devices have been paired</string>
28+
<string name="none_found">No devices found</string>
29+
<string name="title_paired_devices">Paired Devices</string>
30+
<string name="title_other_devices">Other Available Devices</string>
31+
<string name="button_scan">Scan for devices</string>
32+
33+
<!-- Options Menu -->
34+
<string name="bluetooth_tools">Bluetooth tools</string>
35+
<string name="lifecycle_explorer">Lifecycle explorer</string>
36+
<string name="animation_example">Animation</string>
37+
38+
<string name="connect">Connect a device</string>
39+
<string name="discoverable">Make discoverable</string>
40+
41+
<!-- Bluetooth errors -->
42+
<string name="bt_connection_lost">Connection lost</string>
43+
<string name="bt_unable">Unable to connect</string>
44+
</resources>

FinchChat/tools/ant

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="FinchWelcome" default="help">
3+
4+
<!-- The local.properties file is created and updated by the 'android'
5+
tool.
6+
It contains the path to the SDK. It should *NOT* be checked into
7+
Version Control Systems. -->
8+
<property file="local.properties" />
9+
10+
<!-- The build.properties file can be created by you and is never touched
11+
by the 'android' tool. This is the place to change some of the
12+
default property values used by the Ant rules.
13+
Here are some properties you may want to change/update:
14+
15+
source.dir
16+
The name of the source directory. Default is 'src'.
17+
out.dir
18+
The name of the output directory. Default is 'bin'.
19+
20+
Properties related to the SDK location or the project target should
21+
be updated using the 'android' tool with the 'update' action.
22+
23+
This file is an integral part of the build system for your
24+
application and should be checked into Version Control Systems.
25+
26+
-->
27+
<property file="build.properties" />
28+
29+
<!-- The default.properties file is created and updated by the 'android'
30+
tool, as well as ADT.
31+
This file is an integral part of the build system for your
32+
application and should be checked into Version Control Systems. -->
33+
<property file="default.properties" />
34+
35+
36+
<!-- Required pre-setup import -->
37+
<import file="${sdk.dir}/tools/ant/pre_setup.xml" />
38+
39+
40+
<!-- extension targets. Uncomment the ones where you want to do custom work
41+
in between standard targets -->
42+
<!--
43+
<target name="-pre-build">
44+
</target>
45+
<target name="-pre-compile">
46+
</target>
47+
48+
[This is typically used for code obfuscation.
49+
Compiled code location: ${out.classes.absolute.dir}
50+
If this is not done in place, override ${out.dex.input.absolute.dir}]
51+
<target name="-post-compile">
52+
</target>
53+
-->
54+
55+
<!-- Execute the Android Setup task that will setup some properties
56+
specific to the target, and import the build rules files.
57+
58+
The rules file is imported from
59+
<SDK>/tools/ant/
60+
Depending on the project type it can be either:
61+
- main_rules.xml
62+
- lib_rules.xml
63+
- test_rules.xml
64+
65+
To customize existing targets, there are two options:
66+
- Customize only one target:
67+
- copy/paste the target into this file, *before* the
68+
<setup> task.
69+
- customize it to your needs.
70+
- Customize the whole script.
71+
- copy/paste the content of the rules files (minus the top node)
72+
into this file, *after* the <setup> task
73+
- disable the import of the rules by changing the setup task
74+
below to <setup import="false" />.
75+
- customize to your needs.
76+
-->
77+
<setup />
78+
79+
</project>

FinchFrameworkTest/tools/ide/eclipse/classpath renamed to FinchChat/tools/ide/classpath

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="lib-src"/>
45
<classpathentry kind="src" path="gen"/>
56
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
67
<classpathentry kind="output" path="bin/classes"/>

FinchFrameworkTest/tools/ide/classpath renamed to FinchChat/tools/ide/eclipse/classpath

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<classpath>
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="src" path="gen"/>
5-
<classpathentry combineaccessrules="false" kind="src" path="/FinchFramework"/>
65
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
76
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
87
<classpathentry kind="output" path="bin/classes"/>

FinchFrameworkTest/tools/ide/eclipse/project renamed to FinchChat/tools/ide/eclipse/project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>FinchFrameworkTest</name>
3+
<name>FinchChat</name>
44
<comment></comment>
55
<projects>
66
</projects>

FinchFrameworkTest/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs renamed to FinchChat/tools/ide/eclipse/settings/org.eclipse.jdt.core.prefs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Sun Jan 15 16:56:08 PST 2012
1+
#Sun Jan 15 16:56:46 PST 2012
22
eclipse.preferences.version=1
33
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
44
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

FinchFrameworkTest/tools/ide/project renamed to FinchChat/tools/ide/project

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>FinchFrameworkTest</name>
3+
<name>FinchFramework</name>
44
<comment></comment>
55
<projects>
6-
<project>FinchFramework</project>
76
</projects>
87
<buildSpec>
98
<buildCommand>

FinchFramework/AndroidManifest.xml

+5-11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
package="com.finchframework.finch"
44
android:versionCode="1"
55
android:versionName="1.0">
6+
7+
<uses-sdk android:minSdkVersion="7" />
8+
9+
<uses-permission android:name="android.permission.INTERNET" />
10+
611
<application android:icon="@drawable/icon"
712
android:label="@string/app_name"
813
android:debuggable="true">
@@ -13,16 +18,5 @@
1318
<category android:name="android.intent.category.LAUNCHER" />
1419
</intent-filter>
1520
</activity>
16-
<activity android:name="com.finchframework.bluetooth.BtConsoleActivity" />
17-
<activity android:name="com.finchframework.bluetooth.DeviceListActivity"
18-
android:label="@string/select_device"
19-
android:configChanges="orientation|keyboardHidden"/>
20-
<activity android:name="animate.AnimateActivity"></activity>
2121
</application>
22-
23-
<uses-permission android:name="android.permission.INTERNET" />
24-
<uses-permission android:name="android.permission.BLUETOOTH" />
25-
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
26-
27-
<uses-sdk android:minSdkVersion="7" />
2822
</manifest>

FinchFramework/res/anim/flip.xml

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<set xmlns:android="http://schemas.android.com/apk/res/android">
3-
<rotate
4-
android:fromDegrees="0.0"
5-
android:toDegrees="180.0"
6-
android:pivotX="50%"
7-
android:pivotY="50%"
8-
android:duration="2000"
9-
/>
10-
</set>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android" >
3+
4+
<rotate
5+
android:duration="2000"
6+
android:fromDegrees="0.0"
7+
android:pivotX="50%"
8+
android:pivotY="50%"
9+
android:toDegrees="180.0" />
10+
11+
</set>
+14-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
23

3-
<menu xmlns:android="http://schemas.android.com/apk/res/android">
4-
<item android:id="@+id/menu_lifecycle"
5-
android:icon="@android:drawable/ic_menu_manage"
6-
android:title="@string/lifecycle_explorer" />
7-
<item android:id="@+id/menu_bluetooth"
8-
android:icon="@android:drawable/ic_menu_manage"
9-
android:title="@string/bluetooth_tools" />
10-
<item android:id="@+id/menu_animation"
11-
android:icon="@android:drawable/ic_menu_rotate"
12-
android:title="@string/animation_example" />
13-
</menu>
4+
<item
5+
android:id="@+id/menu_lifecycle"
6+
android:icon="@android:drawable/ic_menu_preferences"
7+
android:title="@string/lifecycle_explorer"/>
8+
<item
9+
android:id="@+id/menu_bluetooth"
10+
android:icon="@android:drawable/ic_menu_preferences"
11+
android:title="@string/bluetooth_tools"/>
12+
<item
13+
android:id="@+id/menu_animation"
14+
android:icon="@android:drawable/ic_menu_preferences"
15+
android:title="@string/animation_example"/>
1416

17+
</menu>

FinchFramework/res/values/colors.xml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<resources>
2+
23
<color name="white">#ffffff</color>
34
<color name="medium_gray">#444444</color>
45
<color name="blue">#0000bb</color>
6+
57
</resources>

FinchFramework/res/values/strings.xml

+5-37
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3-
<string name="hello">Hello World, FinchWelcome!</string>
4-
<string name="app_name">Finch</string>
53

6-
<string name="finch_video_app_name">Finch Video</string>
7-
<string name="finch_video_update_content">Update Content</string>
8-
<string name="finch_video_search">Search Videos</string>
9-
<string name="checkbox_app_name">Checkbox App</string>
10-
11-
<dimen name="finch_video_padding">2px</dimen>
12-
13-
<string-array name="finchwelcomemenustrings">
14-
<item>"Preferences"</item>
15-
</string-array>
16-
17-
<string name="send">Send</string>
18-
<string name="not_connected">You are not connected to a device</string>
19-
<string name="bt_not_enabled_leaving">Bluetooth was not enabled. Leaving Bluetooth Chat.</string>
20-
<string name="title_connecting">connecting...</string>
21-
<string name="title_connected_to">connected: </string>
22-
<string name="title_not_connected">not connected</string>
23-
24-
<!-- DeviceListActivity -->
25-
<string name="scanning">scanning for devices...</string>
26-
<string name="select_device">select a device to connect</string>
27-
<string name="none_paired">No devices have been paired</string>
28-
<string name="none_found">No devices found</string>
29-
<string name="title_paired_devices">Paired Devices</string>
30-
<string name="title_other_devices">Other Available Devices</string>
31-
<string name="button_scan">Scan for devices</string>
4+
<string name="connect">Connect a device</string>
5+
<string name="discoverable">Make discoverable</string>
326

337
<!-- Options Menu -->
34-
<string name="bluetooth_tools">Bluetooth tools</string>
358
<string name="lifecycle_explorer">Lifecycle explorer</string>
9+
<string name="bluetooth_tools">Bluetooth tools</string>
3610
<string name="animation_example">Animation</string>
37-
38-
<string name="connect">Connect a device</string>
39-
<string name="discoverable">Make discoverable</string>
40-
41-
<!-- Bluetooth errors -->
42-
<string name="bt_connection_lost">Connection lost</string>
43-
<string name="bt_unable">Unable to connect</string>
44-
</resources>
11+
12+
</resources>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
33
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="lib-src"/>
54
<classpathentry kind="src" path="gen"/>
65
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
77
<classpathentry kind="output" path="bin/classes"/>
88
</classpath>

0 commit comments

Comments
 (0)